[Fai-commit] r6723 - trunk/bin
Michael Prokop
mika at alioth.debian.org
Sat Oct 22 14:56:44 UTC 2011
Author: mika
Date: 2011-10-22 14:56:43 +0000 (Sat, 22 Oct 2011)
New Revision: 6723
Modified:
trunk/bin/make-fai-nfsroot
Log:
make-fai-nfsroot: divert /sbin/initctl if the executable is present
We can't deploy Ubuntu on Debian otherwise, since it fails
because rsyslog can't talk to upstart during installation.
So make sure we divert /sbin/initctl then.
From: Michael Prokop <mika at grml.org>
Modified: trunk/bin/make-fai-nfsroot
===================================================================
--- trunk/bin/make-fai-nfsroot 2011-10-22 14:54:49 UTC (rev 6722)
+++ trunk/bin/make-fai-nfsroot 2011-10-22 14:56:43 UTC (rev 6723)
@@ -350,6 +350,15 @@
# liloconfig, dump needs these files
echo "# UNCONFIGURED FSTAB FOR BASE SYSTEM" > etc/fstab
+ # Work around Ubuntu's failure in installing rsyslog with
+ # "start: Unable to connect to Upstart: Failed to connect to
+ # socket /com/ubuntu/upstart: Connection refused"
+ if $ROOTCMD test -x /usr/sbin/dpkg-divert && [ -x $NFSROOT/sbin/initctl ] ; then
+ LC_ALL=C $ROOTCMD dpkg-divert --quiet --add --rename /sbin/initctl
+ ln -sf /bin/true $NFSROOT/sbin/initctl
+ INITCTL_DIVERT=true
+ fi
+
# we need these option before installing the first package. So we
# can't put this into fai-nfsroot /etc/apt/apt.conf.d/90fai
cat <<EOF >$NFSROOT/etc/apt/apt.conf.d/10fai
@@ -549,6 +558,13 @@
rm -f $NFSROOT/etc/hosts $NFSROOT/etc/resolv.conf* $NFSROOT/etc/fai/fai.conf
ainsl -as $NFSROOT/etc/hosts "127.0.0.1 localhost"
fi
+
+# get rid of initctl divert again
+if [ "$INITCTL_DIVERT" = true ] ; then
+ rm -f $NFSROOT/sbin/initctl
+ LC_ALL=C $ROOTCMD dpkg-divert --rename --remove /sbin/initctl
+fi
+
umount_dirs
if [ -n "$xzpid" ]; then
More information about the Fai-commit
mailing list