summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scripts/gutsy19
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/gutsy b/scripts/gutsy
index 36a2f50..3e53e13 100644
--- a/scripts/gutsy
+++ b/scripts/gutsy
@@ -172,6 +172,12 @@ Status: install ok installed" >> "$TARGET/var/lib/dpkg/status"
info CONFREQ "Configuring required packages..."
+ if doing_variant fakechroot && [ -e "$TARGET/var/lib/dpkg/info/initscripts.postinst" ]
+ then
+ # fix initscripts postinst (no mounting possible, and wrong if condition)
+ sed -i '/dpkg.*--compare-versions/ s/\<lt\>/lt-nl/' "$TARGET/var/lib/dpkg/info/initscripts.postinst"
+ fi
+
echo \
"#!/bin/sh
exit 101" > "$TARGET/usr/sbin/policy-rc.d"
@@ -184,6 +190,16 @@ echo
echo \"Warning: Fake start-stop-daemon called, doing nothing\"" > "$TARGET/sbin/start-stop-daemon"
chmod 755 "$TARGET/sbin/start-stop-daemon"
+ if [ -x "$TARGET/sbin/initctl" ]; then
+ mv "$TARGET/sbin/initctl" "$TARGET/sbin/initctl.REAL"
+ echo \
+"#!/bin/sh
+if [ \"\$1\" = version ]; then exec /sbin/initctl.REAL \"\$@\"; fi
+echo
+echo \"Warning: Fake initctl called, doing nothing\"" > "$TARGET/sbin/initctl"
+ chmod 755 "$TARGET/sbin/initctl"
+ fi
+
setup_dselect_method apt
smallyes '' |
@@ -224,6 +240,9 @@ echo \"Warning: Fake start-stop-daemon called, doing nothing\"" > "$TARGET/sbin/
dpkg_progress $baseprog $bases CONFBASE "Configuring base system" CONFIGURING
fi
+ if [ -x "$TARGET/sbin/initctl.REAL" ]; then
+ mv "$TARGET/sbin/initctl.REAL" "$TARGET/sbin/initctl"
+ fi
mv "$TARGET/sbin/start-stop-daemon.REAL" "$TARGET/sbin/start-stop-daemon"
rm -f "$TARGET/usr/sbin/policy-rc.d"