From d7ce5e780282148f86941ebb6babc7ae4b50b07e Mon Sep 17 00:00:00 2001 From: Erik Andersen Date: Wed, 9 Feb 2000 04:40:25 +0000 Subject: Update the sample inittab to add the "ctrlaltdel" action. Note a bug in busybox init that I need to fix. -Erik --- TODO | 4 ++++ examples/inittab | 8 +++++--- scripts/inittab | 8 +++++--- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/TODO b/TODO index 51a0d147a..1c3b460e7 100644 --- a/TODO +++ b/TODO @@ -10,6 +10,10 @@ around to it some time. If you have any good ideas, please let me know. separate package (named perhaps tiny-netkit?). This currently includes hostid, hostname, mnc, and ping. +* init's waitfor() calls wait() which can catch and ignore the wrong pid + exiting. That other process is then not restarted. + + -Erik diff --git a/examples/inittab b/examples/inittab index dc8e92114..bb547b740 100644 --- a/examples/inittab +++ b/examples/inittab @@ -23,7 +23,8 @@ # # : The runlevels field is completely ignored. # -# : Valid actions include: sysinit, respawn, askfirst, wait, and once. +# : Valid actions include: sysinit, respawn, askfirst, wait, once, +# and ctrlaltdel. # # Note: askfirst acts just like respawn, but before running the specified # process it displays the line "Please press Enter to activate this @@ -70,6 +71,7 @@ tty5::respawn:/sbin/getty 38400 tty5 # Example how to put a getty on a modem line. #ttyS2::respawn:/sbin/getty -x0 -s 57600 ttyS2 -# Not currently supported, but may be sometime in the future... -#::ctrlaltdel:/sbin/reboot +# Stuff to do before rebooting +::ctrlaltdel:/bin/umount -a -r > /dev/null 2>&1 +::ctrlaltdel:/sbin/swapoff -a > /dev/null 2>&1 diff --git a/scripts/inittab b/scripts/inittab index dc8e92114..bb547b740 100644 --- a/scripts/inittab +++ b/scripts/inittab @@ -23,7 +23,8 @@ # # : The runlevels field is completely ignored. # -# : Valid actions include: sysinit, respawn, askfirst, wait, and once. +# : Valid actions include: sysinit, respawn, askfirst, wait, once, +# and ctrlaltdel. # # Note: askfirst acts just like respawn, but before running the specified # process it displays the line "Please press Enter to activate this @@ -70,6 +71,7 @@ tty5::respawn:/sbin/getty 38400 tty5 # Example how to put a getty on a modem line. #ttyS2::respawn:/sbin/getty -x0 -s 57600 ttyS2 -# Not currently supported, but may be sometime in the future... -#::ctrlaltdel:/sbin/reboot +# Stuff to do before rebooting +::ctrlaltdel:/bin/umount -a -r > /dev/null 2>&1 +::ctrlaltdel:/sbin/swapoff -a > /dev/null 2>&1 -- cgit v1.2.3