[SCM] live-build branch, debian-next, updated. debian/3.0_a11-1-14-gcd7a038
Marco Amadori
marco.amadori at gmail.com
Thu Feb 10 22:32:23 UTC 2011
The following commit has been merged in the debian-next branch:
commit cd7a038bef560d618a74dc04037a5dfbd55cba04
Author: Marco Amadori <marco.amadori at gmail.com>
Date: Thu Feb 10 23:31:21 2011 +0100
Upstart initsystem support.
Signed-off-by: Marco Amadori <marco.amadori at gmail.com>
diff --git a/functions/defaults.sh b/functions/defaults.sh
index 4e97816..86bf23b 100755
--- a/functions/defaults.sh
+++ b/functions/defaults.sh
@@ -148,7 +148,20 @@ Set_defaults ()
esac
# Setting initsystem
- LB_INITSYSTEM="${LB_INITSYSTEM:-sysvinit}"
+ case "${LB_MODE}" in
+ ubuntu)
+ if [ "${LB_INITRAMFS}" = "live-boot" ]
+ then
+ LB_INITSYSTEM="${LB_INITSYSTEM:-upstart}"
+ else
+ LB_INITSYSTEM="${LB_INITSYSTEM:-sysvinit}"
+ fi
+ ;;
+
+ *)
+ LB_INITSYSTEM="${LB_INITSYSTEM:-sysvinit}"
+ ;;
+ esac
# Setting fdisk
if [ -z "${LB_FDISK}" ] || [ ! -x "${LB_FDISK}" ]
diff --git a/scripts/build/lb_chroot_linux-image b/scripts/build/lb_chroot_linux-image
index cdbbe38..411e06e 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
--
live-build
More information about the debian-live-changes
mailing list