[SCM] live-config branch, debian-next, updated. debian/3.0_a38-1-7-g7cbadf8
Daniel Baumann
daniel at debian.org
Wed Jun 6 16:21:18 UTC 2012
The following commit has been merged in the debian-next branch:
commit 7cbadf80bfae2873047254b7804480cf80d3021a
Author: Daniel Baumann <daniel at debian.org>
Date: Wed Jun 6 18:21:15 2012 +0200
Respecting noeject and cdrom-detect/eject=false as boot parameters for preventing ejection of the live media.
diff --git a/bin/boot-init.sh b/bin/boot-init.sh
index d94c24d..aee1eb6 100755
--- a/bin/boot-init.sh
+++ b/bin/boot-init.sh
@@ -76,59 +76,8 @@ device_is_USB_flash_drive()
return 1
}
-# check for netboot
-if [ ! -z "${NETBOOT}" ] || grep -qs netboot /proc/cmdline || grep -qsi root=/dev/nfs /proc/cmdline || grep -qsi root=/dev/cifs /proc/cmdline
-then
- return 0
-fi
-
-# check for toram
-if grep -qs toram /proc/cmdline
-then
- return 0
-fi
-
-# Don't prompt to eject the SD card on Babbage board, where we reuse it
-# as a quasi-boot-floppy. Technically this uses a bit of ubiquity
-# (archdetect), but since this is mostly only relevant for
-# installations, who cares ...
-if [ -x "$(which archdetect 2>/dev/null)" ]
-then
- subarch="$(archdetect)"
-
- case $subarch in
- arm*/imx51)
- return 0
- ;;
- esac
-fi
-
-log_begin_msg "live-boot: caching reboot files..."
-
-prompt=1
-if [ "${NOPROMPT}" = "Yes" ]
-then
- prompt=
-fi
-
-for path in $(which halt) $(which reboot) /etc/rc?.d /etc/default $(which stty) /bin/plymouth
-do
- cache_path "${path}"
-done
-
-for x in $(cat /proc/cmdline)
-do
- case ${x} in
- quickreboot)
- QUICKREBOOT="Yes"
- ;;
- esac
-done
-
-mount -o remount,ro /live/overlay
-
-if [ -z ${QUICKREBOOT} ]
-then
+Eject ()
+{
# Exit if the system was booted from an ISO image rather than a physical CD
grep -qs find_iso= /proc/cmdline && return 0
# TODO: i18n
@@ -175,4 +124,55 @@ then
read x < /dev/console
fi
+}
+
+# check for netboot
+if [ ! -z "${NETBOOT}" ] || grep -qs netboot /proc/cmdline || grep -qsi root=/dev/nfs /proc/cmdline || grep -qsi root=/dev/cifs /proc/cmdline
+then
+ return 0
+fi
+
+# check for toram
+if grep -qs toram /proc/cmdline
+then
+ return 0
+fi
+
+# Don't prompt to eject the SD card on Babbage board, where we reuse it
+# as a quasi-boot-floppy. Technically this uses a bit of ubiquity
+# (archdetect), but since this is mostly only relevant for
+# installations, who cares ...
+if [ -x "$(which archdetect 2>/dev/null)" ]
+then
+ subarch="$(archdetect)"
+
+ case $subarch in
+ arm*/imx51)
+ return 0
+ ;;
+ esac
+fi
+
+log_begin_msg "live-boot: caching reboot files..."
+
+prompt=1
+if [ "${NOPROMPT}" = "Yes" ]
+then
+ prompt=
+fi
+
+for path in $(which halt) $(which reboot) /etc/rc?.d /etc/default $(which stty) /bin/plymouth
+do
+ cache_path "${path}"
+done
+
+mount -o remount,ro /live/overlay
+
+# Check if we need to eject the drive
+if grep -qs "cdrom-detect/eject=false" /proc/cmdline ||
+ grep -qs "noeject" /proc/cmdline
+then
+ return
+else
+ Eject
fi
--
live-config
More information about the debian-live-changes
mailing list