Somewhat fixing sysvinit and casper legacy support, slightly improved patch from Rui Miguel P. Bernardo <rui.bernardo.pt@gmail.com> (Closes: #772522, #772651).

This however will still not work properly building upstart based
images but they have been broken/unsupported anyway since a long
time.
This commit is contained in:
Daniel Baumann 2014-12-10 08:19:46 +01:00
parent 0e9d949c3d
commit 048c0827ae
2 changed files with 43 additions and 13 deletions

View File

@ -288,7 +288,15 @@ Set_defaults ()
*)
case "${LB_SYSTEM}" in
live)
LB_INITSYSTEM="${LB_INITSYSTEM:-sysvinit}"
case "${LB_PARENT_DISTRIBUTION}" in
wheezy)
LB_INITSYSTEM="${LB_INITSYSTEM:-sysvinit}"
;;
*)
LB_INITSYSTEM="${LB_INITSYSTEM:-systemd}"
;;
esac
;;
normal)

View File

@ -64,7 +64,7 @@ USAGE="${PROGRAM} [--apt apt|aptitude]\n\
\t [--ignore-system-defaults]\n\
\t [--initramfs auto|none|live-boot|casper]\n\
\t [--initramfs-compression bzip2|gzip|lzma]\n\
\t [--initsystem sysvinit|runit|systemd|upstart|none]\n\
\t [--initsystem sysvinit|systemd|upstart|none]\n\
\t [--image-name [NAME]\n\
\t [--interactive shell]\n\
\t [--isohybrid-options OPTION|\"OPTIONS\"]\n\
@ -1355,19 +1355,41 @@ if [ ! -e config/package-lists/live.list.chroot ]
then
mkdir -p config/package-lists
cat > config/package-lists/live.list.chroot << EOF
live-boot
live-config
EOF
case "${LB_INITRAMFS}" in
live-boot)
echo "live-boot" > config/package-lists/live.list.chroot
echo "live-config" >> config/package-lists/live.list.chroot
case "${LB_PARENT_DISTRIBUTION}" in
wheezy)
echo "live-config-sysvinit" >> config/package-lists/live.list.chroot
;;
case "${LB_PARENT_DISTRIBUTION}" in
wheezy)
echo "live-config-sysvinit" >> config/package-lists/live.list.chroot
;;
*)
echo "live-config-systemd" >> config/package-lists/live.list.chroot
;;
*)
case "${LB_INITSYSTEM}" in
none)
# do nothing
;;
systemd)
echo "live-config-systemd" >> config/package-lists/live.list.chroot
;;
sysvinit|upstart)
echo "live-config-${LB_INITSYSTEM}" >> config/package-lists/live.list.chroot
echo "sysvinit-core" >> config/package-lists/live.list.chroot
;;
esac
;;
esac
;;
casper)
echo "casper" > config/package-lists/live.list.chroot
;;
*)
;;
esac
fi