Change default value of DIB_DEBIAN_ALT_INIT_PACKAGE
For quite a while Debian is shipped with systemd-sysv by default. However, default value of DIB_DEBIAN_ALT_INIT_PACKAGE is not in sync across elements. We change a default now for the `debian` element along with removing `apt_get_bp_extra_opts` that is not defined or used anywhere else. Change-Id: If5d3f0a21467f926c23bb39a1853be73befa768e
This commit is contained in:
parent
1897b12ee9
commit
335f8dc6fd
@ -20,8 +20,14 @@ if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then
|
||||
fi
|
||||
set -eu
|
||||
set -o pipefail
|
||||
|
||||
case "${DIB_RELEASE}" in
|
||||
hamm|slink|potato|woody|sarge|etch|lenny|squeeze|wheezy)
|
||||
DIB_DEBIAN_ALT_INIT_PACKAGE=${DIB_DEBIAN_ALT_INIT_PACKAGE:-sysvinit}
|
||||
;;
|
||||
*)
|
||||
DIB_DEBIAN_ALT_INIT_PACKAGE=${DIB_DEBIAN_ALT_INIT_PACKAGE:-systemd-sysv}
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
adduser --gecos Debian-cloud-init-user --disabled-password --quiet debian
|
||||
@ -32,9 +38,9 @@ chmod 0440 /etc/sudoers.d/debian-cloud-init
|
||||
if [ "$DIB_DEBIAN_ALT_INIT_PACKAGE" != "sysvinit" ]; then
|
||||
# To avoid a conflict against an essential package, we need to remove sysvinit first
|
||||
dpkg --purge --force remove-essential sysvinit
|
||||
apt-get install -y $apt_get_bp_extra_opts $DIB_DEBIAN_ALT_INIT_PACKAGE
|
||||
printf \"Package: sysvinit\nPin: origin ""\nPin-Priority: -1\n\" > \
|
||||
/etc/apt/preferences.d/sysvinit > /etc/apt/preferences.d/sysvinit
|
||||
apt-get install -y $DIB_DEBIAN_ALT_INIT_PACKAGE
|
||||
printf "Package: sysvinit\nPin: origin \"\"\nPin-Priority: -1\n" > \
|
||||
/etc/apt/preferences.d/sysvinit
|
||||
fi
|
||||
|
||||
case "${DIB_RELEASE}" in
|
||||
|
@ -0,0 +1,9 @@
|
||||
---
|
||||
|
||||
other:
|
||||
- |
|
||||
Value of ``DIB_DEBIAN_ALT_INIT_PACKAGE`` has been switched to
|
||||
``systemd-sysv`` for Debian releases older then Jessie.
|
||||
If you still need to build a version of Debian that is relying
|
||||
on ``sysvinit`` please override the ``DIB_DEBIAN_ALT_INIT_PACKAGE``
|
||||
variable for that.
|
Loading…
Reference in New Issue
Block a user