Files
infix/package/factory/Config.in
T
Joachim Wiberg bc21f93ec2 Add support for returning a device to factory defaults
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>
2023-01-04 15:24:36 +01:00

11 lines
415 B
Plaintext

config BR2_PACKAGE_FACTORY
bool "factory-reset"
help
Simple factory reset program/login-shell for instructing the
system to factory reset itself, and reboot.
The program is made to run as SUID root to be able to tell the
system to reboot. Sufficient care has been taken to make the
factory program as secure as possible. With the worst possible
eftect to only be abused to reboot the system.