From fbba9fe46e9964087909a87e96e4160679e5cb9e Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Mon, 18 Feb 2019 14:58:59 +0000 Subject: [PATCH] Make sure buildd images have a /usr/sbin/policy-rc.d symlink Installing policyrcd-script-zg2 doesn't quite do this because of the way that live-build installs its own temporary version of policy-rc.d. The only remotely sensible way I can see to deal with this is to create the symlink manually. --- debian/changelog | 6 ++++++ live-build/buildd/hooks/01-policy-rc-d.binary | 13 +++++++++++++ 2 files changed, 19 insertions(+) create mode 100755 live-build/buildd/hooks/01-policy-rc-d.binary diff --git a/debian/changelog b/debian/changelog index c714824c..7f1514a2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +livecd-rootfs (2.525.19) UNRELEASED; urgency=medium + + * Make sure buildd images have a /usr/sbin/policy-rc.d symlink. + + -- Colin Watson Mon, 18 Feb 2019 14:55:41 +0000 + livecd-rootfs (2.525.18) bionic; urgency=medium [ Michael Hudson-Doyle ] diff --git a/live-build/buildd/hooks/01-policy-rc-d.binary b/live-build/buildd/hooks/01-policy-rc-d.binary new file mode 100755 index 00000000..d827875f --- /dev/null +++ b/live-build/buildd/hooks/01-policy-rc-d.binary @@ -0,0 +1,13 @@ +#! /bin/sh +set -e + +# Put the /usr/sbin/policy-rc.d alternatives symlink in place. Ordinarily +# update-alternatives ought to create this when policyrcd-script-zg2 is +# installed, but that doesn't work because live-build has already installed +# a dummy one at that point. The simplest approach is to repair the +# situation by putting it in place here. +if [ -L binary/etc/alternatives/policy-rc.d ] && \ + [ ! -e binary/usr/sbin/policy-rc.d ] && \ + [ ! -L binary/usr/sbin/policy-rc.d ]; then + ln -s /etc/alternatives/policy-rc.d binary/usr/sbin/policy-rc.d +fi