[pkg-fso-commits] [SCM] Various non-packaged files branch, master, updated. bf58b9271b7e4ddd2dcc6ccb43cad9b9e2d4c2be

Steffen Moeller moeller at debian.org
Sat Sep 19 14:07:33 UTC 2009


The following commit has been merged in the master branch:
commit 0761f8f5bc14198d4f8a7c5d7161214b2ea4fb74
Author: Steffen Moeller <moeller at debian.org>
Date:   Sat Sep 19 15:38:22 2009 +0200

    Unterminated quotation.

diff --git a/install.sh b/install.sh
index db46584..5c91d2d 100755
--- a/install.sh
+++ b/install.sh
@@ -167,6 +167,29 @@ ensure_proc_is_mounted () {
 
 }
 
+# cdebootstrap performs that automatically, but we need to take some
+# extra precaution when installing packages that would normally
+# start services. Those might interfere with local services or just
+# expect bits to be mounted that are not mounted or ... you name it.
+diverting_invoke_rc_d () {
+	mv "$INST_DIR"/usr/sbin/invoke-rc.d "$INST_DIR"/usr/sbin/invoke-rc.d.diverted
+	cat > "$INST_DIR"/usr/sbin/invoke-rc.d <<EOINVOKERCD
+#!/bin/sh
+ echo "I: ignoring call to invoke-rc.d '$*'"
+EOINVOKERCD
+	chmod 755 "$INST_DIR"/usr/sbin/invoke-rc.d 
+}
+
+
+# this function complements the action of diverting_invoke_rc_d
+restoring_invoke_rc_d () {
+	if [ -f "$INST_DIR"/usr/sbin/invoke-rc.d.diverted ]; then
+		mv "$INST_DIR"/usr/sbin/invoke-rc.d.diverted "$INST_DIR"/usr/sbin/invoke-rc.d 
+	else
+		echo "E: no invoke-rc.d found to be put back in place. Investigate!"
+	fi
+}
+
 
 # fight against auto-mounting
 umount_all () {
@@ -913,7 +936,10 @@ action_debian () {
 action_apt () {
 	echo "Configuring APT"
 
-	ensure_proc_is_mounted
+	if ! ensure_proc_is_mounted; then
+		echo "  /proc is needed for APT configuration - please investigate."
+		exit 1
+	fi
 
 	echo " * Populating /etc/apt/sources.list"
 	cat >> "$INST_DIR/etc/apt/sources.list" <<__END__
@@ -956,14 +982,9 @@ __END__
 
 
 	# dropbear at least cannot be installed without preventing the restart to happen
-	mv "$INST_DIR"/usr/sbin/invoke-rc.d "$INST_DIR"/usr/sbin/invoke-rc.d.diverted
-	cat > "$INST_DIR"/usr/sbin/invoke-rc.d <<EOINVOKERCD
-#!/bin/sh
- echo "I: ignoring call to invoke-rc.d '$*'
-EOINVOKERCD
-	chmod 755 "$INST_DIR"/usr/sbin/invoke-rc.d 
-
+	diverting_invoke_rc_d
 	chroot "$INST_DIR" apt-get $APT_OPTIONS install $(echo $DEBIAN_EXTRA_PACKAGES | tr "," " ")
+	restoring_invoke_rc_d
 
 	echo " * Cleaning APT cache"
 	chroot "$INST_DIR" apt-get clean
@@ -982,11 +1003,13 @@ action_fso () {
 	ensure_proc_is_mounted
 
 	echo "* core packages"
+	diverting_invoke_rc_d
 	chroot "$INST_DIR" /bin/sh -e <<__END_CHROOT__
 export DEBIAN_FRONTEND=noninteractive
 apt-get $APT_OPTIONS install $FSO_PACKAGES
 apt-get clean
 __END_CHROOT__
+	restoring_invoke_rc_d
 
 	echo -n "* Zhone GUI: "
 	if [ "$ZHONE" = true ]; then

-- 
Various non-packaged files



More information about the pkg-fso-commits mailing list