summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMarco Amadori <marco.amadori@gmail.com>2011-02-10 23:31:21 +0100
committerDaniel Baumann <daniel@debian.org>2011-03-09 19:20:42 +0100
commitfda3fe6310235084202aa479f191eeada6919f13 (patch)
tree6301562f65d33dfd5538ecd17f8aba602ca84aa2 /scripts
parent2159e3fba790bd0fd5da866acac3ead7b200e26e (diff)
downloadvyos-live-build-fda3fe6310235084202aa479f191eeada6919f13.tar.gz
vyos-live-build-fda3fe6310235084202aa479f191eeada6919f13.zip
Upstart initsystem support.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build/lb_chroot_linux-image27
1 files changed, 11 insertions, 16 deletions
diff --git a/scripts/build/lb_chroot_linux-image b/scripts/build/lb_chroot_linux-image
index cdbbe3837..411e06e2c 100755
--- a/scripts/build/lb_chroot_linux-image
+++ b/scripts/build/lb_chroot_linux-image
@@ -83,24 +83,19 @@ EOF
echo "live-config live-config-${LB_INITSYSTEM}" >> chroot/root/chroot_packages
fi
- # Do initsystem specific hacks (FIXME)
- case "${LB_INITSYSTEM}" in
- sysvinit)
-
- ;;
-
- runit)
-
- ;;
-
- systemd)
-
- ;;
+ # Do initsystem specific hacks
+ if [ "${LB_INITSYSTEM}" != "sysvinit" ]
+ then
+ # lets see if we still need the squeeze's "pre init system policy discussion" hack:
- upstart)
+ IS_SYSVINIT_ESSENTIAL="$(Chroot chroot dpkg-query --show --showformat='${Essential}\n' sysvinit)"
+ RC=$?
- ;;
- esac
+ if [ "${IS_SYSVINIT_ESSENTIAL}" != "no" ] && [ "${RC}" == "0" ]; then
+ # sysvinit is both installed and essential, ugly hack to remove it
+ Chroot chroot dpkg --force-remove-essential --remove sysvinit || true
+ fi
+ fi
# Creating stage file
Create_stagefile .stage/chroot_linux-image