X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=debian%2Finit;h=d59ed452f30c86e7a930bb21ea954f888d3b74c6;hb=8f49c1d4c2702f8ac267aa50d74eba57c422d617;hp=b0837816d818bae911cb1950c7df9a47756fa032;hpb=cc62ca76356dc851006e3fc980cc1dcc46ef9ca6;p=live-boot-grml.git diff --git a/debian/init b/debian/init index b083781..d59ed45 100644 --- a/debian/init +++ b/debian/init @@ -68,7 +68,12 @@ do_stop () return 0 fi - for path in $(which halt) $(which reboot) /etc/rc?.d /etc/default; do + prompt=1 + if grep -qs noprompt /proc/cmdline; then + prompt= + fi + + for path in $(which halt) $(which reboot) /etc/rc?.d /etc/default $(which stty); do cache_path "${path}" done @@ -84,10 +89,14 @@ do_stop () if [ -x /usr/bin/eject ] then eject -p -m /live/image >/dev/null 2>&1 + + [ "$prompt" ] || return 0 fi + stty sane < /dev/console + # XXX - i18n - echo "Please remove the disc and close the tray (if any) then press ENTER: " + echo "Please remove the disc and close the tray (if any) then press ENTER: " > /dev/console 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)"