[SCM] live-helper branch, debian-next, updated. debian/2.0_a8-1-3-g150c18e

Daniel Baumann daniel at debian.org
Thu Mar 4 12:42:36 UTC 2010


The following commit has been merged in the debian-next branch:
commit 9d65522189447aa7829c4ab8a66ce341bda6ff41
Author: Trent W. Buck <twb at cybersource.com.au>
Date:   Thu Mar 4 13:36:28 2010 +0100

    Adding helper to prevent upstart from being run during chroot phase (Closes: #571056).

diff --git a/helpers/binary b/helpers/binary
index 234d898..0a69918 100755
--- a/helpers/binary
+++ b/helpers/binary
@@ -40,6 +40,7 @@ then
 	lh chroot_resolv install ${*}
 	lh chroot_hostname install ${*}
 	lh chroot_sysv-rc install ${*}
+	lh chroot_upstart install ${*}
 	lh chroot_apt install-binary ${*}
 	lh chroot_sources install ${*}
 fi
@@ -93,6 +94,7 @@ fi
 lh chroot_apt remove ${*}
 lh chroot_sysv-rc remove ${*}
 lh chroot_sysfs remove ${*}
+lh chroot_upstart remove ${*}
 lh chroot_selinuxfs remove ${*}
 lh chroot_proc remove ${*}
 lh chroot_devpts remove ${*}
diff --git a/helpers/binary_rootfs b/helpers/binary_rootfs
index a862895..c33585f 100755
--- a/helpers/binary_rootfs
+++ b/helpers/binary_rootfs
@@ -154,6 +154,7 @@ case "${LH_CHROOT_FILESYSTEM}" in
 					lh chroot_resolv remove ${*}
 					lh chroot_hosts remove ${*}
 					lh chroot_sysv-rc remove ${*}
+					lh chroot_upstart remove ${*}
 					lh chroot_dpkg remove ${*}
 					lh chroot_debianchroot remove ${*}
 					lh chroot_sysfs remove ${*}
@@ -171,6 +172,7 @@ case "${LH_CHROOT_FILESYSTEM}" in
 					lh chroot_debianchroot install ${*}
 					lh chroot_dpkg install ${*}
 					lh chroot_sysv-rc install ${*}
+					lh chroot_upstart install ${*}
 					lh chroot_hosts install ${*}
 					lh chroot_resolv install ${*}
 					lh chroot_hostname install ${*}
@@ -236,6 +238,7 @@ case "${LH_CHROOT_FILESYSTEM}" in
 					lh chroot_resolv remove ${*}
 					lh chroot_hosts remove ${*}
 					lh chroot_sysv-rc remove ${*}
+					lh chroot_upstart remove ${*}
 					lh chroot_dpkg remove ${*}
 					lh chroot_debianchroot remove ${*}
 					lh chroot_sysfs remove ${*}
@@ -253,6 +256,7 @@ case "${LH_CHROOT_FILESYSTEM}" in
 					lh chroot_debianchroot install ${*}
 					lh chroot_dpkg install ${*}
 					lh chroot_sysv-rc install ${*}
+					lh chroot_upstart install ${*}
 					lh chroot_hosts install ${*}
 					lh chroot_resolv install ${*}
 					lh chroot_hostname install ${*}
@@ -351,6 +355,7 @@ case "${LH_CHROOT_FILESYSTEM}" in
 					lh chroot_resolv remove ${*}
 					lh chroot_hosts remove ${*}
 					lh chroot_sysv-rc remove ${*}
+					lh chroot_upstart remove ${*}
 					lh chroot_dpkg remove ${*}
 					lh chroot_debianchroot remove ${*}
 					lh chroot_sysfs remove ${*}
@@ -368,6 +373,7 @@ case "${LH_CHROOT_FILESYSTEM}" in
 					lh chroot_debianchroot install ${*}
 					lh chroot_dpkg install ${*}
 					lh chroot_sysv-rc install ${*}
+					lh chroot_upstart install ${*}
 					lh chroot_hosts install ${*}
 					lh chroot_resolv install ${*}
 					lh chroot_hostname install ${*}
diff --git a/helpers/chroot b/helpers/chroot
index 65c5e65..02a4c04 100755
--- a/helpers/chroot
+++ b/helpers/chroot
@@ -35,6 +35,7 @@ lh chroot_sysfs install ${*}
 lh chroot_debianchroot install ${*}
 lh chroot_dpkg install ${*}
 lh chroot_sysv-rc install ${*}
+lh chroot_upstart install ${*}
 lh chroot_hosts install ${*}
 lh chroot_resolv install ${*}
 lh chroot_hostname install ${*}
@@ -69,6 +70,7 @@ lh chroot_hostname remove ${*}
 lh chroot_resolv remove ${*}
 lh chroot_hosts remove ${*}
 lh chroot_sysv-rc remove ${*}
+lh chroot_upstart remove ${*}
 lh chroot_dpkg remove ${*}
 lh chroot_debianchroot remove ${*}
 lh chroot_sysfs remove ${*}
diff --git a/helpers/chroot_sysv-rc b/helpers/chroot_upstart
similarity index 58%
copy from helpers/chroot_sysv-rc
copy to helpers/chroot_upstart
index 74a9702..a963044 100755
--- a/helpers/chroot_sysv-rc
+++ b/helpers/chroot_upstart
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-# lh_chroot_sysv-rc(1) - manage /usr/sbin/policy-rc.d
+# lh_chroot_upstart(1) - manage /usr/sbin/initctl
 # Copyright (C) 2006-2009 Daniel Baumann <daniel at debian.org>
 #
 # live-helper comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
@@ -13,7 +13,7 @@ set -e
 . "${LH_BASE:-/usr/share/live-helper}"/live-helper.sh
 
 # Setting static variables
-DESCRIPTION="$(Echo 'manage /usr/sbin/policy-rc.d')"
+DESCRIPTION="$(Echo 'manage /usr/sbin/initctl')"
 HELP=""
 USAGE="${PROGRAM} {install|remove} [--force]"
 
@@ -28,10 +28,10 @@ Require_stagefile .stage/config .stage/bootstrap
 
 case "${1}" in
 	install)
-		Echo_message "Configuring file /usr/sbin/policy-rc.d"
+		Echo_message "Configuring file /usr/sbin/initctl"
 
 		# Checking stage file
-		Check_stagefile .stage/chroot_sysv-rc
+		Check_stagefile .stage/chroot_upstart
 
 		# Checking lock file
 		Check_lockfile .lock
@@ -39,27 +39,27 @@ case "${1}" in
 		# Creating lock file
 		Create_lockfile .lock
 
-		if [ -f chroot/usr/sbin/policy-rc.d ]
+		if [ -f chroot/usr/sbin/initctl ]
 		then
-			# Save policy-rc.d file
-			mv chroot/usr/sbin/policy-rc.d chroot/usr/sbin/policy-rc.d.orig
+			# Save initctl file
+			mv chroot/usr/sbin/initctl chroot/usr/sbin/initctl.orig
 		fi
 
-		# Create policy-rc.d file
-cat > chroot/usr/sbin/policy-rc.d << EOF
+		# Create initctl file
+cat > chroot/usr/sbin/initctl << EOF
 #!/bin/sh
 echo "All runlevel operations denied by policy" >&2
 exit 101
 EOF
 
-		chmod 0755 chroot/usr/sbin/policy-rc.d
+		chmod 0755 chroot/usr/sbin/initctl
 
 		# Creating stage file
-		Create_stagefile .stage/chroot_sysv-rc
+		Create_stagefile .stage/chroot_upstart
 		;;
 
 	remove)
-		Echo_message "Deconfiguring file /usr/sbin/policy-rc.d"
+		Echo_message "Deconfiguring file /usr/sbin/initctl"
 
 		# Checking lock file
 		Check_lockfile .lock
@@ -67,17 +67,17 @@ EOF
 		# Creating lock file
 		Create_lockfile .lock
 
-		if [ -f chroot/usr/sbin/policy-rc.d.orig ]
+		if [ -f chroot/usr/sbin/initctl.orig ]
 		then
-			# Restore policy-rc.d file
-			mv chroot/usr/sbin/policy-rc.d.orig chroot/usr/sbin/policy-rc.d
+			# Restore initctl file
+			mv chroot/usr/sbin/initctl.orig chroot/usr/sbin/initctl
 		else
-			# Remove policy-rc.d file
-			rm -f chroot/usr/sbin/policy-rc.d
+			# Remove initctl file
+			rm -f chroot/usr/sbin/initctl
 		fi
 
 		# Removing stage file
-		rm -f .stage/chroot_sysv-rc
+		rm -f .stage/chroot_upstart
 		;;
 
 	*)

-- 
live-helper



More information about the debian-live-changes mailing list