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

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


The following commit has been merged in the master branch:
commit 2a3c6e83326cd8c27b32d0178ad894020ceaddcd
Author: Steffen Moeller <moeller at debian.org>
Date:   Sat Sep 19 15:43:48 2009 +0200

    Adding test on existence of diverted invoke-rc.d.

diff --git a/install.sh b/install.sh
index 5c91d2d..f5e6f9b 100755
--- a/install.sh
+++ b/install.sh
@@ -172,11 +172,17 @@ ensure_proc_is_mounted () {
 # 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
+	if [ ! -r "$INST_DIR"/usr/sbin/invoke-rc.d.diverted" ]; then
+		mv "$INST_DIR"/usr/sbin/invoke-rc.d "$INST_DIR"/usr/sbin/invoke-rc.d.diverted
+	else
+		echo "I: invoke-rc.d is already diverted - was previous install interrupted?"
+		# continuing anyway, since functional existence of dummy is not guaranteed.
+	fi
 	cat > "$INST_DIR"/usr/sbin/invoke-rc.d <<EOINVOKERCD
 #!/bin/sh
- echo "I: ignoring call to invoke-rc.d '$*'"
+echo "I: ignoring call to invoke-rc.d '\$*'"
 EOINVOKERCD
+	fi
 	chmod 755 "$INST_DIR"/usr/sbin/invoke-rc.d 
 }
 

-- 
Various non-packaged files



More information about the pkg-fso-commits mailing list