[SCM] live-config-staging branch, debian, updated. 314965afd37ec53f2b5600ec294d7617e70cc576

Daniel Baumann daniel at debian.org
Mon Dec 6 16:36:05 UTC 2010


The following commit has been merged in the debian branch:
commit 314965afd37ec53f2b5600ec294d7617e70cc576
Author: Daniel Baumann <daniel at debian.org>
Date:   Mon Dec 6 17:35:38 2010 +0100

    Using cmdline variable rather than parsing file in /proc.

diff --git a/scripts/config/900-vmware-player b/scripts/config/900-vmware-player
index 75dc1da..2a086b8 100755
--- a/scripts/config/900-vmware-player
+++ b/scripts/config/900-vmware-player
@@ -31,7 +31,7 @@
 
 Vmware_player ()
 {
-	if ! grep -qs "live-config.vmware-player=" /proc/cmdline
+	if ! echo ${_CMDLINE} | grep -qs "live-config.vmware-player="
 	then
 		return
 	fi
@@ -43,7 +43,7 @@ Vmware_player ()
 
 Configure_vmware_player ()
 {
-	for _PARAMETER in $(cat /proc/cmdline)
+	for _PARAMETER in ${_CMDLINE}
 	do
 		case "${_PARAMETER}" in
 			live-config.vmware-player=*)
diff --git a/scripts/config/901-mount-all b/scripts/config/901-mount-all
index 11f6842..5e5653c 100755
--- a/scripts/config/901-mount-all
+++ b/scripts/config/901-mount-all
@@ -2,6 +2,11 @@
 
 Mount_all ()
 {
+	if ! echo ${_CMDLINE} | grep -qs "live-config.mount-all"
+	then
+		return
+	fi
+
 	echo -n " mount-all"
 
 	Do_mount_all
@@ -71,11 +76,6 @@ is_luks()
 
 Do_mount_all ()
 {
-	if ! grep -qs "live-config.mount-all" /proc/cmdline
-	then
-		return
-	fi
-
 	# Scanning block devices
 	for SYSBLOCK in $(echo /sys/block/* | tr ' ' '\n' | grep -vE "/(loop|ram|dm-|fd)")
 	do
diff --git a/scripts/config/902-apt-upgrade b/scripts/config/902-apt-upgrade
index 240a79f..28087dd 100755
--- a/scripts/config/902-apt-upgrade
+++ b/scripts/config/902-apt-upgrade
@@ -2,6 +2,11 @@
 
 Apt_upgrade ()
 {
+	if ! echo ${_CMDLINE} | grep -qs "live-config.apt-upgrade"
+	then
+		return
+	fi
+
 	echo -n " apt-upgrade"
 
 	Do_apt_upgrade
@@ -9,11 +14,6 @@ Apt_upgrade ()
 
 Do_apt_upgrade ()
 {
-	if ! grep -qs "live-config.apt-upgrade" /proc/cmdline
-	then
-		return
-	fi
-
 	Start_network
 
 	DEBIAN_FRONTEND="noninteractive"
diff --git a/scripts/config/903-iptables b/scripts/config/903-iptables
index 12b227e..89a7c83 100755
--- a/scripts/config/903-iptables
+++ b/scripts/config/903-iptables
@@ -10,17 +10,16 @@ Iptables ()
 
 	echo -n " iptables"
 
+	if ! echo ${_CMDLINE} | grep -qs "live-helper.iptables"
+	then
+		return
+	fi
+
 	Configure_iptables
 }
 
 Configure_iptables ()
 {
-	# Boot parameters can be acted up either this way...
-	if ! grep -qs "live-helper.iptables" /proc/cmdline
-	then
-		return
-	fi
-
 	echo 1 > /proc/sys/net/ipv4/ip_forward
 
 	iptables -N block
diff --git a/scripts/config/904-locales-extra b/scripts/config/904-locales-extra
index fca4b34..d916a24 100755
--- a/scripts/config/904-locales-extra
+++ b/scripts/config/904-locales-extra
@@ -2,6 +2,11 @@
 
 Locales_extra ()
 {
+	if ! echo ${_CMDLINE} | grep -qs "live-config.locales-extra"
+	then
+		return
+	fi
+
 	echo -n " locales-extra"
 
 	Do_locales_extra
@@ -9,11 +14,6 @@ Locales_extra ()
 
 Do_locales_extra ()
 {
-	if ! grep -qs "live-config.locales-extra" /proc/cmdline
-	then
-		return
-	fi
-
 	DEBIAN_FRONTEND="noninteractive"
 	export DEBIAN_FRONTEND
 

-- 
live-config-staging



More information about the debian-live-changes mailing list