mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-22 01:13:00 +02:00
This change adds a `factory` tool, and login shell, that schedules a
reset of all writable (overlay) filesystems. The tool is set up with
the suid gid flag to allow all members of the wheel group to perform
the reset.
The login method only allows reset from /dev/console, to prevent any
malicious reset over SSH. This should be further constrained later
when PAM is introduced.
To initiate factory reset from the login prompt, use login/pass:
factory/reset
To initiate factory reset from the shell, call
factory
Both methods are interactive by default, but two command line options
can be used to modify the behavior:
-r Skip reboot, and "reboot now?" question
-y Assume yes to all questions, for non-interactive use
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>