summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorT(A)ILS developers <amnesia@boum.org>2010-08-09 20:48:17 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 17:59:20 +0100
commit274ce8e4e2b902e4e7b4871c284cee0285cf18a6 (patch)
tree5e43e1c450d4dd78f1454acb9200d9cbe9a63b36
parent7e9d7f6671c23f8bbc87349a56c5f132f01164ad (diff)
downloadlive-boot-274ce8e4e2b902e4e7b4871c284cee0285cf18a6.tar.gz
live-boot-274ce8e4e2b902e4e7b4871c284cee0285cf18a6.zip
Adding noprompt={usb,cd} feature.
-rw-r--r--debian/live-boot.init13
-rw-r--r--manpages/en/live-boot.72
-rwxr-xr-xscripts/live10
3 files changed, 24 insertions, 1 deletions
diff --git a/debian/live-boot.init b/debian/live-boot.init
index 1a85267..dd338b1 100644
--- a/debian/live-boot.init
+++ b/debian/live-boot.init
@@ -136,7 +136,7 @@ do_stop ()
fi
prompt=1
- if grep -qs noprompt /proc/cmdline
+ if [ ${NOPROMPT} = "Yes" ]
then
prompt=
fi
@@ -170,6 +170,12 @@ do_stop ()
# failes because they actually remember the
# "ejected" state even after reboot
MESSAGE="Please remove the USB flash drive"
+
+ if [ ${NOPROMPT} = "usb" ]
+ then
+ prompt=
+ fi
+
else
# ejecting is a very good idea here
MESSAGE="Please remove the disc, close the the tray (if any)"
@@ -179,6 +185,11 @@ do_stop ()
eject -p -m /live/image >/dev/null 2>&1
fi
+ if [ ${NOPROMPT} = "cd" ]
+ then
+ prompt=
+ fi
+
fi
[ "$prompt" ] || return 0
diff --git a/manpages/en/live-boot.7 b/manpages/en/live-boot.7
index 1d0d45b..71e15b4 100644
--- a/manpages/en/live-boot.7
+++ b/manpages/en/live-boot.7
@@ -98,6 +98,8 @@ This parameter disables the default disabling of filesystem checks in /etc/fstab
disables the "persistent" feature, useful if the bootloader (like syslinux) has been installed with persistent enabled.
.IP "\fBnoprompt\fR" 4
Do not prompt to eject the CD or remove the USB flash drive on reboot.
+.IP "\fBnoprompt\fR=\fITYPE\fR" 4
+This tells live-boot not to prompt to eject the CD (when noprompt=cd) or remove the USB flash drive (when noprompt=usb) on reboot.
.IP "\fBswapon\fR" 4
This parameter enables usage of local swap partitions.
.IP "\fBpersistent\fR[={nofiles|cryptsetup}]" 4
diff --git a/scripts/live b/scripts/live
index 5daec7f..c5f4d50 100755
--- a/scripts/live
+++ b/scripts/live
@@ -266,6 +266,16 @@ Arguments ()
export NOPERSISTENT
;;
+ noprompt)
+ NOPROMPT="Yes"
+ export NOPROMPT
+ ;;
+
+ noprompt=*)
+ NOPROMPT="${ARGUMENT#noprompt=}"
+ export NOPROMPT
+ ;;
+
quickusbmodules)
QUICKUSBMODULES="Yes"
export QUICKUSBMODULES