diff options
author | Colin Watson <cjwatson@debian.org> | 2009-10-03 21:56:05 (GMT) |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2009-10-03 21:56:05 (GMT) |
commit | d20d8167433e4db73b0f9f56e746a92811913689 (patch) | |
tree | 6c6cc6100e3dc862391fb262144b0a44aae6f7e1 /scripts | |
parent | c211034782a0e12f449991c5a6fb925b4274a98a (diff) | |
download | debootstrap-d20d8167433e4db73b0f9f56e746a92811913689.zip debootstrap-d20d8167433e4db73b0f9f56e746a92811913689.tar.gz debootstrap-d20d8167433e4db73b0f9f56e746a92811913689.tar.bz2 |
For recent Ubuntu versions, move $TARGET/sbin/initctl aside in the same
way we do start-stop-daemon, so that attempts to control Upstart jobs
won't inadvertently affect jobs in the host system.
r60924
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/ubuntu/gutsy | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/ubuntu/gutsy b/scripts/ubuntu/gutsy index 791a7b6..37d4b53 100644 --- a/scripts/ubuntu/gutsy +++ b/scripts/ubuntu/gutsy @@ -164,6 +164,15 @@ 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 +echo +echo \"Warning: Fake initctl called, doing nothing\"" > "$TARGET/sbin/initctl" + chmod 755 "$TARGET/sbin/initctl" + fi + setup_dselect_method apt smallyes '' | @@ -201,6 +210,9 @@ echo \"Warning: Fake start-stop-daemon called, doing nothing\"" > "$TARGET/sbin/ dpkg --status-fd 8 --force-confold --skip-same-version --configure -a 8>&1 1>&7 | dpkg_progress $baseprog $bases CONFBASE "Configuring base system" CONFIGURING) 7>&1 + 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" progress $bases $bases CONFBASE "Configuring base system" |