Commit Graph

3 Commits (8e3d87cf45fa4f3660baffa09a08cabc4e9d92e1)

Author SHA1 Message Date
Dustin 7c3738d067 Add set-root-password command
The `set-root-password` command sets up an alternate mount namespace
with a writable `/etc` directory and then runs `passwd` in it.  This
allows `passwd` to create its lock files and backup files, without
requiring that the real `/etc` to be mutable.  After `passwd` finishes
and has updated its private copy of `/etc/shadow`, the script rewrites
the real one with its contents.
2023-03-15 21:21:29 -05:00
Dustin 274c592f5d Add factory reset feature
The `factory-reset` command provides a way to completely wipe the data
partition, thus erasing any local configuration and state.  The command
itself simply enables a special systemd service unit that is activated
during the shutdown process.  This unit runs a script, after all
filesystems, except rootfs, have been unmmounted.  It then erases the
signature of the filesystem on the data partition, so it will appear
blank the next time the system boots.  This will trigger the
`init-storage` process, to create a new filesystem on the partition.
2023-03-12 12:50:05 -05:00
Dustin 025b7c6115 Initial commit 2023-02-13 23:24:36 -06:00