[SCM] live-boot branch, upstream, updated. upstream/3.0_a36-1-ge5efea9

Daniel Baumann daniel at debian.org
Wed Jul 25 15:26:56 UTC 2012


The following commit has been merged in the upstream branch:
commit e5efea97c9573d24a5cd4aa051a5f39696913bcf
Author: Daniel Baumann <daniel at debian.org>
Date:   Wed Jul 25 17:27:31 2012 +0200

    Adding upstream version 3.0~a37.

diff --git a/VERSION b/VERSION
index 6b82b43..ca7b780 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-3.0~a36-1
+3.0~a37-1
diff --git a/backends/initramfs-tools/live.hook b/backends/initramfs-tools/live.hook
index 7ead725..78aae2e 100755
--- a/backends/initramfs-tools/live.hook
+++ b/backends/initramfs-tools/live.hook
@@ -1,32 +1,12 @@
 #!/bin/sh
 
-# initramfs hook for live-boot (Debian Live)
-
 set -e
 
-# initramfs-tools header
-
-PREREQ=""
-
-prereqs()
-{
-	echo "${PREREQ}"
-}
-
-case "${1}" in
-	prereqs)
-		prereqs
-		exit 0
-		;;
-esac
-
 . /usr/share/initramfs-tools/hook-functions
 
-[ "${QUIET}" ] || echo -n live-boot:
-
-# live-boot hook
+[ "${QUIET}" ] || echo -n "live-boot:"
 
-# Reading configuration file from filesystem
+# Reading configuration files
 if [ -e /etc/live/boot.conf ]
 then
 	. /etc/live/boot.conf
@@ -40,16 +20,16 @@ then
 	done
 fi
 
-# Handling live-boot
-
+# Checking live-boot
 if [ ! -e /lib/live/boot ]
 then
+	echo
 	echo "W: live-boot-initramfs-tools (backend) installed without live-boot,"
 	echo "W: this initramfs will *NOT* have live support."
 	exit 0
 fi
 
-[ "${QUIET}" ] || echo -n " "core
+[ "${QUIET}" ] || echo -n " core"
 
 mkdir -p "${DESTDIR}/lib/live"
 cp -a /lib/live/boot.sh /lib/live/boot "${DESTDIR}/lib/live"
@@ -63,7 +43,7 @@ do
 	fi
 done
 
-# udev dependencies (squeeze and newer)
+# udev dependencies
 for FILE in /lib/udev/*_id
 do
 	if [ ! -e "${DESTDIR}/${FILE}" ]
@@ -73,15 +53,15 @@ do
 	fi
 done
 
+# wheezy/sid
 if [ -e /lib/udev/rules.d/60-cdrom_id.rules ]
 then
 	mkdir -p ${DESTDIR}/lib/udev/rules.d
 	cp -p /lib/udev/rules.d/60-cdrom_id.rules ${DESTDIR}/lib/udev/rules.d
 fi
 
-# Handling other stuff
+[ "${QUIET}" ] || echo -n " filesystems"
 
-[ "${QUIET}" ] || echo -n " "filesystems
 # Configuration: keymap (usefull when using encryption)
 if [ -x /bin/loadkeys ] && [ -r /etc/console/boottime.kmap.gz ]
 then
@@ -147,7 +127,7 @@ manual_add_modules vfat
 # Filesystem: ntfs
 manual_add_modules ntfs
 
-[ "${QUIET}" ] || echo -n " "devices
+[ "${QUIET}" ] || echo -n " devices"
 # Hardware: cdrom
 manual_add_modules ide-cd
 manual_add_modules ide-generic
@@ -167,7 +147,7 @@ then
 	copy_exec /usr/bin/eject /bin
 fi
 
-[ "${QUIET}" ] || echo -n " "utils
+[ "${QUIET}" ] || echo -n " utils"
 
 # Feature: Verify Checksums
 copy_exec /usr/bin/sha256sum /bin
@@ -176,7 +156,7 @@ copy_exec /usr/bin/md5sum /bin
 # Program: memdisk
 if [ -x /usr/bin/memdiskfind ]
 then
-[ "${QUIET}" ] || echo -n :memdisk
+[ "${QUIET}" ] || echo -n " memdisk"
 	copy_exec /usr/bin/memdiskfind
 	manual_add_modules phram
 	manual_add_modules mtdblock
@@ -185,26 +165,26 @@ fi
 # Program: udev
 if [ -x /sbin/udevadm ]
 then
-	[ "${QUIET}" ] || echo -n " "udev
+	[ "${QUIET}" ] || echo -n " udev"
 	copy_exec /sbin/udevadm /sbin
 fi
 if [ -x /usr/bin/udevinfo ]
 then
-	[ "${QUIET}" ] || echo -n " "udev
+	[ "${QUIET}" ] || echo -n " udev"
 	copy_exec /usr/bin/udevinfo /bin
 fi
 
 # Program: wget
 if [ -x /usr/bin/wget ]
 then
-	[ "${QUIET}" ] || echo -n " "wget
+	[ "${QUIET}" ] || echo -n " wget"
 	copy_exec /usr/bin/wget /bin
 fi
 
 # Program: blockdev
 if [ -x /sbin/blockdev ]
 then
-	[ "${QUIET}" ] || echo -n " "blockdev
+	[ "${QUIET}" ] || echo -n " blockdev"
 	copy_exec /sbin/blockdev /sbin
 fi
 
@@ -214,49 +194,55 @@ manual_add_modules fuse
 # FUSE filesystem: httpfs2
 if [ -x /usr/bin/httpfs2_ssl ]
 then
-	[ "${QUIET}" ] || echo -n " "httpfs:ssl
+	[ "${QUIET}" ] || echo -n " httpfs:ssl"
 	copy_exec /usr/bin/httpfs2_ssl /bin/httpfs
 elif [ -x /usr/bin/httpfs2 ]
 then
-	[ "${QUIET}" ] || echo -n " "httpfs
+	[ "${QUIET}" ] || echo -n " httpfs"
 	copy_exec /usr/bin/httpfs2 /bin/httpfs
 fi
 
 # FUSE filesystem: curlftpfs
 if [ -x /usr/bin/curlftpfs ]
 then
-	[ "${QUIET}" ] || echo -n " "ftpfs
+	[ "${QUIET}" ] || echo -n " ftpfs"
 	copy_exec /usr/bin/curlftpfs /bin
 fi
 
 # iSCSI
 if [ -x /usr/sbin/iscsistart ]
 then
-	[ "${QUIET}" ] || echo -n " "iscsi
+	[ "${QUIET}" ] || echo -n " iscsi"
 	copy_exec /usr/sbin/iscsistart /bin
 	#manual_add_modules ib_iser
 	manual_add_modules iscsi_tcp
 	manual_add_modules crc32c
 fi
 
-if [ "${LIVE_DNS}" = "true" ]
-then
-	[ "${QUIET}" ] || echo -n " "dns
-	#copy_exec /lib/libnss_files.so.*      /lib  # /etc/hosts and /etc/passwd
-	copy_exec /lib/libnss_dns.so.*      /lib  # DNS server
-	#copy_exec /lib/libnss_compat.so.*      /lib  # /etc/passwd
-
-	# Configuration file - may be needed if /etc/hosts is used.
-	#mkdir -p $DESTDIR/etc
-	#cp -p /etc/nsswitch.conf $DESTDIR/etc
-fi
+# Some experimental stuff
 
-if [ "${LIVE_UNIONMOUNT}" = "true" ]
-then
-	[ "${QUIET}" ] || echo -n " "unionmount
-	# UnionMount
-	# only mount from patched util-linux can do this currently
-	copy_exec /bin/mount /bin/mount_full
-fi
+case "${LIVE_DNS}" in
+	true)
+		[ "${QUIET}" ] || echo -n " dns"
+
+		#copy_exec /lib/libnss_files.so.*      /lib  # /etc/hosts and /etc/passwd
+		copy_exec /lib/libnss_dns.so.*      /lib  # DNS server
+		#copy_exec /lib/libnss_compat.so.*      /lib  # /etc/passwd
+
+		# Configuration file - may be needed if /etc/hosts is used.
+		#mkdir -p $DESTDIR/etc
+		#cp -p /etc/nsswitch.conf $DESTDIR/etc
+		;;
+esac
+
+case "${LIVE_UNIONMOUNT}" in
+	true)
+		[ "${QUIET}" ] || echo -n " unionmount"
+
+		# UnionMount
+		# only mount from patched util-linux can do this currently
+		copy_exec /bin/mount /bin/mount_full
+		;;
+esac
 
 [ "${QUIET}" ] || echo .
diff --git a/manpages/de/live-boot.de.7 b/manpages/de/live-boot.de.7
index 4fee838..94dfd6b 100644
--- a/manpages/de/live-boot.de.7
+++ b/manpages/de/live-boot.de.7
@@ -3,7 +3,7 @@
 .\" This file was generated with po4a. Translate the source file.
 .\"
 .\"*******************************************************************
-.TH LIVE\-BOOT 7 18.07.2012 3.0~a36\-1 "Debian Live Project"
+.TH LIVE\-BOOT 7 25.07.2012 3.0~a37\-1 "Debian Live Project"
 
 .SH NAME
 \fBlive\-boot\fP \- System Boot Scripts
diff --git a/manpages/de/live-persistence.conf.de.5 b/manpages/de/live-persistence.conf.de.5
index 9bdf6b5..92571e4 100644
--- a/manpages/de/live-persistence.conf.de.5
+++ b/manpages/de/live-persistence.conf.de.5
@@ -3,7 +3,7 @@
 .\" This file was generated with po4a. Translate the source file.
 .\"
 .\"*******************************************************************
-.TH LIVE\-BOOT conf 18.07.2012 3.0~a36\-1 "Debian Live Project"
+.TH LIVE\-BOOT conf 25.07.2012 3.0~a37\-1 "Debian Live Project"
 
 .SH NAME
 \fBlive\-persistence.conf\fP \- Configuration file for persistence media in
diff --git a/manpages/en/live-boot.7 b/manpages/en/live-boot.7
index 36f222c..14ffb43 100644
--- a/manpages/en/live-boot.7
+++ b/manpages/en/live-boot.7
@@ -1,4 +1,4 @@
-.TH LIVE\-BOOT 7 2012\-07\-18 3.0~a36-1 "Debian Live Project"
+.TH LIVE\-BOOT 7 2012\-07\-25 3.0~a37-1 "Debian Live Project"
 
 .SH NAME
 \fBlive\-boot\fR \- System Boot Scripts
diff --git a/manpages/en/live-persistence.conf.5 b/manpages/en/live-persistence.conf.5
index 924683f..617ca64 100644
--- a/manpages/en/live-persistence.conf.5
+++ b/manpages/en/live-persistence.conf.5
@@ -1,4 +1,4 @@
-.TH LIVE\-BOOT conf 2012\-07\-18 3.0~a36-1 "Debian Live Project"
+.TH LIVE\-BOOT conf 2012\-07\-25 3.0~a37-1 "Debian Live Project"
 
 .SH NAME
 \fBlive-persistence.conf\fR \- Configuration file for persistence media in
diff --git a/manpages/es/live-boot.es.7 b/manpages/es/live-boot.es.7
index f23a4a7..775985d 100644
--- a/manpages/es/live-boot.es.7
+++ b/manpages/es/live-boot.es.7
@@ -3,7 +3,7 @@
 .\" This file was generated with po4a. Translate the source file.
 .\"
 .\"*******************************************************************
-.TH LIVE\-BOOT 7 18.07.2012 3.0~a36\-1 "Proyecto Debian Live"
+.TH LIVE\-BOOT 7 25.07.2012 3.0~a37\-1 "Proyecto Debian Live"
 
 .SH NOMBRE
 \fBlive\-boot\fP \- Scripts de Arranque del Sistema
diff --git a/manpages/es/live-persistence.conf.es.5 b/manpages/es/live-persistence.conf.es.5
index 3952eea..4d00d54 100644
--- a/manpages/es/live-persistence.conf.es.5
+++ b/manpages/es/live-persistence.conf.es.5
@@ -3,7 +3,7 @@
 .\" This file was generated with po4a. Translate the source file.
 .\"
 .\"*******************************************************************
-.TH LIVE\-BOOT conf 18.07.2012 3.0~a36\-1 "Proyecto Debian Live"
+.TH LIVE\-BOOT conf 25.07.2012 3.0~a37\-1 "Proyecto Debian Live"
 
 .SH NOMBRE
 \fBlive\-persistence.conf\fP \- Fichero para configurar medios de almacenamiento
diff --git a/manpages/po/de/live-boot.7.po b/manpages/po/de/live-boot.7.po
index a2777d8..61e2b4f 100644
--- a/manpages/po/de/live-boot.7.po
+++ b/manpages/po/de/live-boot.7.po
@@ -4,8 +4,8 @@
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: live-boot 3.0~a35-1\n"
-"POT-Creation-Date: 2012-07-18 23:56+0300\n"
+"Project-Id-Version: live-boot 3.0~a37-1\n"
+"POT-Creation-Date: 2012-07-25 17:21+0300\n"
 "PO-Revision-Date: 2012-04-08 22:48+0300\n"
 "Last-Translator: Daniel Baumann <daniel at debian.org>\n"
 "Language-Team: none\n"
@@ -24,13 +24,13 @@ msgstr ""
 #. type: TH
 #: en/live-boot.7:1 en/live-persistence.conf.5:1
 #, no-wrap
-msgid "2012-07-18"
-msgstr "18.07.2012"
+msgid "2012-07-25"
+msgstr "25.07.2012"
 
 #. type: TH
 #: en/live-boot.7:1 en/live-persistence.conf.5:1
 #, no-wrap
-msgid "3.0~a36-1"
+msgid "3.0~a37-1"
 msgstr ""
 
 #. type: TH
diff --git a/manpages/po/de/live-persistence.conf.5.po b/manpages/po/de/live-persistence.conf.5.po
index d2676e6..3393a98 100644
--- a/manpages/po/de/live-persistence.conf.5.po
+++ b/manpages/po/de/live-persistence.conf.5.po
@@ -4,8 +4,8 @@
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: live-boot 3.0~a35-1\n"
-"POT-Creation-Date: 2012-07-18 23:56+0300\n"
+"Project-Id-Version: live-boot 3.0~a37-1\n"
+"POT-Creation-Date: 2012-07-25 17:21+0300\n"
 "PO-Revision-Date: 2012-04-08 22:48+0300\n"
 "Last-Translator: Daniel Baumann <daniel at debian.org>\n"
 "Language-Team: none\n"
@@ -24,13 +24,13 @@ msgstr ""
 #. type: TH
 #: en/live-boot.7:1 en/live-persistence.conf.5:1
 #, no-wrap
-msgid "2012-07-18"
-msgstr "18.07.2012"
+msgid "2012-07-25"
+msgstr "25.07.2012"
 
 #. type: TH
 #: en/live-boot.7:1 en/live-persistence.conf.5:1
 #, no-wrap
-msgid "3.0~a36-1"
+msgid "3.0~a37-1"
 msgstr ""
 
 #. type: TH
diff --git a/manpages/po/es/live-boot.7.po b/manpages/po/es/live-boot.7.po
index 01c9c12..754bede 100644
--- a/manpages/po/es/live-boot.7.po
+++ b/manpages/po/es/live-boot.7.po
@@ -4,8 +4,8 @@
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: live-boot 3.0~a35-1\n"
-"POT-Creation-Date: 2012-07-18 23:56+0300\n"
+"Project-Id-Version: live-boot 3.0~a37-1\n"
+"POT-Creation-Date: 2012-07-25 17:21+0300\n"
 "PO-Revision-Date: 2012-06-07 20:29+0200\n"
 "Last-Translator: Carlos Zuferri «chals» <chals at altorricon.com>\n"
 "Language-Team:  none\n"
@@ -24,14 +24,14 @@ msgstr "LIVE-BOOT"
 #. type: TH
 #: en/live-boot.7:1 en/live-persistence.conf.5:1
 #, no-wrap
-msgid "2012-07-18"
-msgstr "18.07.2012"
+msgid "2012-07-25"
+msgstr "25.07.2012"
 
 #. type: TH
 #: en/live-boot.7:1 en/live-persistence.conf.5:1
 #, no-wrap
-msgid "3.0~a36-1"
-msgstr "3.0~a36-1"
+msgid "3.0~a37-1"
+msgstr "3.0~a37-1"
 
 #. type: TH
 #: en/live-boot.7:1 en/live-persistence.conf.5:1
diff --git a/manpages/po/es/live-persistence.conf.5.po b/manpages/po/es/live-persistence.conf.5.po
index 86d9aad..2fdc97c 100644
--- a/manpages/po/es/live-persistence.conf.5.po
+++ b/manpages/po/es/live-persistence.conf.5.po
@@ -4,8 +4,8 @@
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: live-boot 3.0~a35-1\n"
-"POT-Creation-Date: 2012-07-18 23:56+0300\n"
+"Project-Id-Version: live-boot 3.0~a37-1\n"
+"POT-Creation-Date: 2012-07-25 17:21+0300\n"
 "PO-Revision-Date: 2012-06-07 19:11+0200\n"
 "Last-Translator: Carlos Zuferri «chals» <chals at altorricon.com>\n"
 "Language-Team:  none\n"
@@ -23,14 +23,14 @@ msgstr "LIVE-BOOT"
 #. type: TH
 #: en/live-boot.7:1 en/live-persistence.conf.5:1
 #, no-wrap
-msgid "2012-07-18"
-msgstr "18.07.2012"
+msgid "2012-07-25"
+msgstr "25.07.2012"
 
 #. type: TH
 #: en/live-boot.7:1 en/live-persistence.conf.5:1
 #, no-wrap
-msgid "3.0~a36-1"
-msgstr "3.0~a36-1"
+msgid "3.0~a37-1"
+msgstr "3.0~a37-1"
 
 #. type: TH
 #: en/live-boot.7:1 en/live-persistence.conf.5:1
diff --git a/manpages/pot/live-boot.7.pot b/manpages/pot/live-boot.7.pot
index d18a75b..6d7198d 100644
--- a/manpages/pot/live-boot.7.pot
+++ b/manpages/pot/live-boot.7.pot
@@ -7,7 +7,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: live-boot VERSION\n"
-"POT-Creation-Date: 2012-07-18 23:56+0300\n"
+"POT-Creation-Date: 2012-07-25 17:21+0300\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -25,13 +25,13 @@ msgstr ""
 #. type: TH
 #: en/live-boot.7:1 en/live-persistence.conf.5:1
 #, no-wrap
-msgid "2012-07-18"
+msgid "2012-07-25"
 msgstr ""
 
 #. type: TH
 #: en/live-boot.7:1 en/live-persistence.conf.5:1
 #, no-wrap
-msgid "3.0~a36-1"
+msgid "3.0~a37-1"
 msgstr ""
 
 #. type: TH
diff --git a/manpages/pot/live-persistence.conf.5.pot b/manpages/pot/live-persistence.conf.5.pot
index e1e8fa5..575ca43 100644
--- a/manpages/pot/live-persistence.conf.5.pot
+++ b/manpages/pot/live-persistence.conf.5.pot
@@ -7,7 +7,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: live-boot VERSION\n"
-"POT-Creation-Date: 2012-07-18 23:56+0300\n"
+"POT-Creation-Date: 2012-07-25 17:21+0300\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -25,13 +25,13 @@ msgstr ""
 #. type: TH
 #: en/live-boot.7:1 en/live-persistence.conf.5:1
 #, no-wrap
-msgid "2012-07-18"
+msgid "2012-07-25"
 msgstr ""
 
 #. type: TH
 #: en/live-boot.7:1 en/live-persistence.conf.5:1
 #, no-wrap
-msgid "3.0~a36-1"
+msgid "3.0~a37-1"
 msgstr ""
 
 #. type: TH
diff --git a/scripts/boot/0110-cmdline b/scripts/boot/0110-cmdline
deleted file mode 100755
index aa12286..0000000
--- a/scripts/boot/0110-cmdline
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/sh
-
-#set -e
-
-Cmdline ()
-{
-	for _PARAMETER in ${_CMDLINE}
-	do
-		case "${_PARAMETER}" in
-			live-boot.read-only|read-only)
-				LIVE_READ_ONLY="true"
-				;;
-
-			live-boot.swapon=*|swapon=*)
-				LIVE_SWAPON="true"
-				LIVE_SWAPON_DEVICES="${_PARAMETER#*swapon=}"
-				;;
-
-			live-boot.swapon|swapon)
-				LIVE_SWAPON="true"
-				;;
-
-			live-boot.verify-checksums|verify-checksums)
-				LIVE_VERIFY_CHECKSUMS="true"
-				;;
-
-			# Special options
-			live-boot.debug|debug)
-				LIVE_DEBUG="true"
-				;;
-		esac
-	done
-}
diff --git a/scripts/boot/0110-debug b/scripts/boot/0110-debug
new file mode 100755
index 0000000..a74dcb7
--- /dev/null
+++ b/scripts/boot/0110-debug
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+#set -e
+
+Debug ()
+{
+	for _PARAMETER in ${_CMDLINE}
+	do
+		case "${_PARAMETER}" in
+			live-boot.debug|debug)
+				LIVE_DEBUG="true"
+				;;
+		esac
+	done
+
+	if [ "${LIVE_DEBUG}" != "true" ]
+	then
+		return 0
+	fi
+
+	set -x
+}
diff --git a/scripts/boot/0120-read-only b/scripts/boot/0120-read-only
index 588d57b..c05c162 100755
--- a/scripts/boot/0120-read-only
+++ b/scripts/boot/0120-read-only
@@ -4,11 +4,30 @@
 
 Read_only ()
 {
+	for _PARAMETER in ${_CMDLINE}
+	do
+		case "${_PARAMETER}" in
+			live-boot.read-only=*|read-only=*)
+				LIVE_READ_ONLY="true"
+				LIVE_READ_ONLY_DEVICES="${_PARAMETER#*read-only=}"
+				;;
+
+			live-boot.read-only|read-only)
+				LIVE_READ_ONLY="true"
+				;;
+		esac
+	done
+
+	if [ "${LIVE_READ_ONLY}" != "true" ]
+	then
+		return 0
+	fi
+
 	# Marking some block devices as read-only to ensure that nothing
 	# gets written as linux still writes to 'only' read-only mounted filesystems.
-	_DEVICES="/dev/sd* /dev/vd*"
+	LIVE_READ_ONLY_DEVICES="${LIVE_READ_ONLY_DEVICES:-/dev/sd* /dev/vd*}"
 
-	for _DEVICE in ${_DEVICES}
+	for _DEVICE in $(echo ${LIVE_READ_ONLY_DEVICES} | sed -e 's|,| |g')
 	do
 		if [ ! -b "${_DEVICE}" ]
 		then
diff --git a/scripts/boot/3010-verify-checksums b/scripts/boot/3010-verify-checksums
index 7dd5da3..cc4115d 100755
--- a/scripts/boot/3010-verify-checksums
+++ b/scripts/boot/3010-verify-checksums
@@ -4,6 +4,20 @@
 
 Verify_checksums ()
 {
+	for _PARAMETER in ${_CMDLINE}
+	do
+		case "${_PARAMETER}" in
+			live-boot.verify-checksums|verify-checksums)
+				LIVE_VERIFY_CHECKSUMS="true"
+				;;
+		esac
+	done
+
+	if [ "${LIVE_VERIFY_CHECKSUMS}" != "true" ]
+	then
+		return 0
+	fi
+
 	_MOUNTPOINT="${1}"
 
 	_DIGESTS="sha512 sha384 sha256 sha224 sha1 md5"
diff --git a/scripts/boot/3020-swapon b/scripts/boot/3020-swapon
index 281fd04..82e998a 100755
--- a/scripts/boot/3020-swapon
+++ b/scripts/boot/3020-swapon
@@ -2,14 +2,28 @@
 
 #set -e
 
-Swapon ()
+Swap ()
 {
-	if [ "${LIVE_SWAPON}" != "true" ]
+	for _PARAMETER in ${_CMDLINE}
+	do
+		case "${_PARAMETER}" in
+			live-boot.swap=*|swap=*)
+				LIVE_SWAP="true"
+				LIVE_SWAP_DEVICES="${_PARAMETER#*swap=}"
+				;;
+
+			live-boot.swap|swap)
+				LIVE_SWAP="true"
+				;;
+		esac
+	done
+
+	if [ "${LIVE_SWAP}" != "true" ]
 	then
 		return 0
 	fi
 
-	LIVE_SWAPON_DEVICES="${LIVE_SWAPON_DEVICES:-/dev/sd* /dev/vd*}"
+	LIVE_SWAP_DEVICES="${LIVE_SWAP_DEVICES:-/dev/sd* /dev/vd*}"
 
 	if [ -e /run ]
 	then
@@ -20,7 +34,7 @@ Swapon ()
 		_FSTAB="/root/etc/fstab"
 	fi
 
-	for _DEVICE in $(echo ${LIVE_SWAPON_DEVICES} | sed -e 's|,| |g')
+	for _DEVICE in $(echo ${LIVE_SWAP_DEVICES} | sed -e 's|,| |g')
 	do
 		if [ ! -b "${_DEVICE}" ]
 		then
diff --git a/scripts/boot/9990-main.sh b/scripts/boot/9990-main.sh
index 3ad6a72..2cf1d7e 100755
--- a/scripts/boot/9990-main.sh
+++ b/scripts/boot/9990-main.sh
@@ -19,20 +19,11 @@ Main ()
 	. /live.vars
 
 	_CMDLINE="$(cat /proc/cmdline)"
-	Cmdline
 	Cmdline_old
 
-	case "${LIVE_DEBUG}" in
-		true)
-			set -x
-			;;
-	esac
+	Debug
 
-	case "${LIVE_READ_ONLY}" in
-		true)
-			Read_only
-			;;
-	esac
+	Read_only
 
 	Select_eth_device
 
@@ -92,11 +83,7 @@ Main ()
 		panic "Unable to find a medium containing a live file system"
 	fi
 
-	case "${LIVE_VERIFY_CHECKSUMS}" in
-		true)
-			Verify_checksums "${livefs_root}"
-			;;
-	esac
+	Verify_checksums "${livefs_root}"
 
 	if [ "${TORAM}" ]
 	then
@@ -203,11 +190,7 @@ Main ()
 	Fstab
 	Netbase
 
-	case "${LIVE_SWAPON}" in
-		true)
-			Swapon
-			;;
-	esac
+	Swap
 
 	case "${UNIONFS}" in
 		unionfs-fuse)
diff --git a/scripts/boot/9990-misc-helpers.sh b/scripts/boot/9990-misc-helpers.sh
index cc39fcb..117876f 100755
--- a/scripts/boot/9990-misc-helpers.sh
+++ b/scripts/boot/9990-misc-helpers.sh
@@ -1304,7 +1304,7 @@ get_custom_mounts ()
 			local source="${dir}"
 			if [ -n "${opt_source}" ]
 			then
-				if echo ${opt_source} | grep -q -e "^/" -e "^\(.*/\)\?\.\.\?\(/.*\)\?$" && [ "${source}" != "." ]
+				if echo ${opt_source} | grep -q -e "^/" -e "^\(.*/\)\?\.\.\?\(/.*\)\?$" && [ "${opt_source}" != "." ]
 				then
 					log_warning_msg "Skipping unsafe custom mount with option source=${opt_source}: must be either \".\" (the media root) or a relative path w.r.t. the media root that contains neither comas, nor the special \".\" and \"..\" path components"
 					continue
diff --git a/scripts/boot/9990-select-eth-device.sh b/scripts/boot/9990-select-eth-device.sh
index ed1da6f..5a769ce 100755
--- a/scripts/boot/9990-select-eth-device.sh
+++ b/scripts/boot/9990-select-eth-device.sh
@@ -6,7 +6,7 @@ Select_eth_device ()
 	bootconf=$(egrep '^BOOT=' /conf/initramfs.conf | tail -1)
 
 	# can be superseded by command line (used by Debian-Live's netboot for example)
-	for ARGUMENT in $(cat /proc/cmdline)
+	for ARGUMENT in ${_CMDLINE}
 	do
 		case "${ARGUMENT}" in
 			netboot=*)
@@ -40,13 +40,13 @@ Select_eth_device ()
 	fi
 
 	# If user force to use specific device, write it
-	for ARGUMENT in $(cat /proc/cmdline)
+	for ARGUMENT in ${_CMDLINE}
 	do
 		case "${ARGUMENT}" in
 			live-netdev=*)
 				NETDEV="${ARGUMENT#live-netdev=}"
 				echo "DEVICE=$NETDEV" >> /conf/param.conf
-				echo "Found live-netdev parameter in /proc/cmdline. Force to use network device $NETDEV."
+				echo "Found live-netdev parameter, forcing to to use network device $NETDEV."
 				return
 				;;
 		esac

-- 
live-boot



More information about the debian-live-changes mailing list