From fab0a87b56719ec43086c3dcd12c35bb55bfe203 Mon Sep 17 00:00:00 2001 From: Davin McCall Date: Tue, 22 Oct 2024 21:27:56 +1000 Subject: [PATCH] Fix example recovery service to have restart=false --- doc/linux/DINIT-AS-INIT.md | 6 ++++-- doc/linux/services/recovery | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/doc/linux/DINIT-AS-INIT.md b/doc/linux/DINIT-AS-INIT.md index 3f03c471..48df8809 100644 --- a/doc/linux/DINIT-AS-INIT.md +++ b/doc/linux/DINIT-AS-INIT.md @@ -292,9 +292,11 @@ end, we have: There are two additional services, which are not depended on by any other service, and so do not normally start at all: -- `recovery` - this service is started by Dinit if boot fails (and if the user when prompted +- `recovery` - this service is started by Dinit if boot fails (and if the user, when prompted, then chooses the recovery option). It prompts for the root password and then provides a - shell. + shell. It has `restart = false` because once the administrator has finished repairing the system + configuration, they will exit the recovery shell, and at that point they should be offered the + various boot failure options (reboot etc) again. - `single` - this is a "single user mode" startup service which simply runs a shell. An unprivileged user cannot normally start this; doing so requires putting "single" on the kernel command line. When the shell exits, the `chain-to` setting will cause normal diff --git a/doc/linux/services/recovery b/doc/linux/services/recovery index ee9cee36..801f67b3 100644 --- a/doc/linux/services/recovery +++ b/doc/linux/services/recovery @@ -5,3 +5,4 @@ type = process command = /sbin/sulogin options = runs-on-console +restart = false