[Patch] casper: 'quickreboot' option
This patch adds the optional commandline argument 'quickreboot', which
bypasses any attempts to eject the boot media and to ask the user to
eject/remove the media on reboot, allowing for useful remote rebooting
of a casper system.
diff -ru casper-1.81+debian/debian/casper.init casper-1.81
+debian-quickreboot/debian/casper.init
--- casper-1.81+debian/debian/casper.init 2007-02-16 09:10:35.000000000
-0600
+++ casper-1.81+debian-quickreboot/debian/casper.init 2007-02-16
09:10:04.000000000 -0600
@@ -71,17 +71,26 @@
cache_path "$path"
done
- eject -p -m /live_media >/dev/null 2>&1
+ for x in $(cat /proc/cmdline); do
+ case $x in
+ quickreboot)
+ QUICKREBOOT="Yes"
+ ;;
+ esac
+ done
# XXX - i18n
- echo "Please remove the disc and close the tray (if any) then press
ENTER: "
- if [ -x /sbin/usplash_write ]; then
- /sbin/usplash_write "TIMEOUT 86400"
- /sbin/usplash_write "TEXT-URGENT Please remove the disc, close
the tray (if any)"
- /sbin/usplash_write "TEXT-URGENT and press ENTER to continue"
- fi
+ if [ -z ${QUICKREBOOT} ]; then
+ eject -p -m /live_media > /dev/null 2>&1
+ echo "Please remove the disc and close the tray (if any) then
press ENTER: "
+ if [ -x /sbin/usplash_write ]; then
+ /sbin/usplash_write "TIMEOUT 86400"
+ /sbin/usplash_write "TEXT-URGENT Please remove the disc,
close the tray (if any)"
+ /sbin/usplash_write "TEXT-URGENT and press ENTER to
continue"
+ fi
- read x < /dev/console
+ read x < /dev/console
+ fi
}
case "$1" in
diff -ru casper-1.81+debian/debian/manpage/casper.7 casper-1.81
+debian-quickreboot/debian/manpage/casper.7
--- casper-1.81+debian/debian/manpage/casper.7 2007-02-16
09:10:35.000000000 -0600
+++ casper-1.81+debian-quickreboot/debian/manpage/casper.7 2007-02-16
09:09:35.000000000 -0600
@@ -63,6 +63,9 @@
.B nopersistent
disables the above mentioned "persistent" feature, useful if the
bootloader (like syslinux) has been installed with persistent enabled.
.TP
+.B quickreboot
+This option causes casper to reboot without attempting to eject the
media and without asking the user to remove the boot media.
+.TP
.B "showmounts"
This parameter will make casper to show on "/" the ro filesystems
(mostly compressed) on /casper. This is not enabled by default because
could lead to problems by applications like "mono" which store binary
paths on installation.
.TP
Reply to: