X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=debian%2Finit;h=a7274bd99393df3a19181d2d8f5b1bb69b0fc4dd;hb=ccea277caf476cdfef4c0f953df5a97062d8be42;hp=4e53eff889de7cb0fe4ba48f3eec79e5b7a24ca8;hpb=4bdaa2237c6ae923d1dd068e9024ebceca3f40d9;p=live-boot-grml.git diff --git a/debian/init b/debian/init index 4e53eff..a7274bd 100644 --- a/debian/init +++ b/debian/init @@ -1,30 +1,31 @@ -#! /bin/sh +#!/bin/sh + ### BEGIN INIT INFO -# Provides: casper -# Required-Start: $syslog -# Required-Stop: $syslog -# Should-Start: $local_fs -# Should-Stop: $local_fs -# Default-Start: 1 2 3 4 5 -# Default-Stop: 0 6 -# Short-Description: Casper init script -# Description: Resyncs snapshots, evantually caches files in order -# to let remove the media. +# Provides: live-initramfs +# Required-Start: $syslog +# Required-Stop: $syslog +# Should-Start: $local_fs +# Should-Stop: $local_fs +# Default-Start: 1 2 3 4 5 +# Default-Stop: 0 6 +# Short-Description: live-initramfs init script +# Description: Resyncs snapshots, evantually caches files in order to +# let remove the media. ### END INIT INFO -# Author: Tollef Fog Heen -# Marco Amadori -# +# Authors: Tollef Fog Heen +# Marco Amadori + PATH=/usr/sbin:/usr/bin:/sbin:/bin -NAME=casper +NAME=live-initramfs SCRIPTNAME=/etc/init.d/${NAME} -DO_SNAPSHOT=/sbin/${NAME}-snapshot +DO_SNAPSHOT=/sbin/live-snapshot -# Exit if system was not booted by casper -grep -qs boot=casper /proc/cmdline || exit 0 +# Exit if system was not booted by live-initramfs +grep -qs boot=live /proc/cmdline || exit 0 # Read configuration variable file if it is present -[ -r /etc/$NAME.conf ] && . /etc/$NAME.conf +[ -r /etc/live.conf ] && . /etc/live.conf # Load the VERBOSE setting and other rcS variables [ -f /etc/default/rcS ] && . /etc/default/rcS @@ -71,17 +72,27 @@ do_stop () cache_path "$path" done - eject -p -m /cdrom >/dev/null 2>&1 + for x in $(cat /proc/cmdline); do + case $x in + quickreboot) + QUICKREBOOT="Yes" + ;; + esac + done + + if [ -z ${QUICKREBOOT} ]; then + eject -p -m /live_media >/dev/null 2>&1 - # 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 + # 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 - read x < /dev/console + read x < /dev/console + fi } case "$1" in