summaryrefslogtreecommitdiffstats
path: root/scripts/gutsy
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@debian.org>2017-10-28 11:55:52 (GMT)
committerMattia Rizzolo <mattia@debian.org>2017-10-28 11:55:52 (GMT)
commite217253ac21ec1bfe0f1073fc7ea7ccee7932ede (patch)
tree4cbd995ffe5f6321068fe1e28f426aad4507a5f6 /scripts/gutsy
parent42f6a32c4d675eafdaf0192a3e9dbb8e1df43e89 (diff)
downloaddebootstrap-e217253ac21ec1bfe0f1073fc7ea7ccee7932ede.zip
debootstrap-e217253ac21ec1bfe0f1073fc7ea7ccee7932ede.tar.gz
debootstrap-e217253ac21ec1bfe0f1073fc7ea7ccee7932ede.tar.bz2
scripts/gutsy: Fix debootstrap --variant=fakechroot failure because initscripts is no longer part of the base system
Signed-off-by: Mattia Rizzolo <mattia@debian.org>
Diffstat (limited to 'scripts/gutsy')
-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"