From d20d8167433e4db73b0f9f56e746a92811913689 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Sat, 3 Oct 2009 21:56:05 +0000 Subject: 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 --- scripts/ubuntu/gutsy | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'scripts') 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" -- cgit v1.2.3