projects
/
live-boot-grml.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Including wc in initramfs (Closes: #512413).
[live-boot-grml.git]
/
debian
/
init
diff --git
a/debian/init
b/debian/init
index
a24fe9f
..
149314b
100644
(file)
--- a/
debian/init
+++ b/
debian/init
@@
-24,6
+24,9
@@
DO_SNAPSHOT=/sbin/live-snapshot
# Exit if system was not booted by live-initramfs
grep -qs boot=live /proc/cmdline || exit 0
# Exit if system was not booted by live-initramfs
grep -qs boot=live /proc/cmdline || exit 0
+# Exit if the system was booted from an ISO image rather than a physical CD
+grep -qs find_iso= /proc/cmdline && exit 0
+
# Read configuration variable file if it is present
[ -r /etc/live.conf ] && . /etc/live.conf
# Read configuration variable file if it is present
[ -r /etc/live.conf ] && . /etc/live.conf
@@
-68,7
+71,12
@@
do_stop ()
return 0
fi
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
cache_path "${path}"
done
@@
-84,6
+92,8
@@
do_stop ()
if [ -x /usr/bin/eject ]
then
eject -p -m /live/image >/dev/null 2>&1
if [ -x /usr/bin/eject ]
then
eject -p -m /live/image >/dev/null 2>&1
+
+ [ "$prompt" ] || return 0
fi
stty sane < /dev/console
fi
stty sane < /dev/console