- if [ ! -z "${ROOTSNAP}" ]; then
- ${DO_SNAPSHOT} --resync-string="${ROOTSNAP}"
- fi
-
- if [ ! -z "${HOMESNAP}" ]; then
- ${DO_SNAPSHOT} --resync-string="${HOMESNAP}"
- 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
-
- 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
-
- for x in $(cat /proc/cmdline); do
- case ${x} in
- quickreboot)
- QUICKREBOOT="Yes"
- ;;
- esac
- done
-
- if [ -z ${QUICKREBOOT} ]; then
- # TODO: i18n, dialog
- if [ -x /usr/bin/eject ]
+ if ! grep -qs nopersistent /proc/cmdline && grep -qs persistent /proc/cmdline
+ then
+ if [ ! -z "${ROOTSNAP}" ]
+ then
+ ${DO_SNAPSHOT} --resync-string="${ROOTSNAP}"
+ fi
+
+ if [ ! -z "${HOMESNAP}" ]
+ then
+ ${DO_SNAPSHOT} --resync-string="${HOMESNAP}"
+ fi
+ 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
+
+ # 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 type archdetect >/dev/null 2>&1
+ then
+ subarch="$(archdetect)"
+
+ case $subarch in
+ arm*/imx51)
+ return 0
+ ;;
+ esac
+ fi
+
+ prompt=1
+ if grep -qs noprompt /proc/cmdline