Install systemd earlier for Ubuntu Bionic
Like we did in https://review.openstack.org/475206 we need to install systemd sooner because of the new world order of containers. Change-Id: Ia60d751fee3af6f8d72ad664107acb337360feca Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
parent
2080055155
commit
e9e7ac2ee1
@ -11,4 +11,7 @@ setting can be found in the element's ``environment.d`` directory in
|
||||
the variable ``DIB_RELEASE``. If a different release of Ubuntu should
|
||||
be created, the variable ``DIB_RELEASE`` can be set appropriately.
|
||||
|
||||
Note that this element installs ``systemd-sysv`` as the init system for
|
||||
18.04+.
|
||||
|
||||
.. element_deps::
|
||||
|
@ -41,13 +41,25 @@ $apt_get update
|
||||
$apt_get clean
|
||||
$apt_get dist-upgrade -y
|
||||
|
||||
$apt_get install -y busybox sudo
|
||||
to_install=""
|
||||
|
||||
# pre-bionic (18.04) brought this in via debootstrap, but init
|
||||
# dependencies have narrowed in the container world, so now we add it
|
||||
# explicitly here so it's brought in early.
|
||||
if [ $DIB_RELEASE != "trusty" ] && [ $DIB_RELEASE != "xenial" ]; then
|
||||
to_install+="systemd-sysv "
|
||||
fi
|
||||
|
||||
# default required
|
||||
to_install+="busybox sudo " # dib-lint: safe_sudo
|
||||
|
||||
if [ "$DIB_PYTHON_VERSION" == "2" ]; then
|
||||
$apt_get install -y python
|
||||
to_install+="python "
|
||||
elif [ "$DIB_PYTHON_VERSION" == "3" ]; then
|
||||
$apt_get install -y python3
|
||||
to_install+="python3 "
|
||||
else
|
||||
echo "ERROR: DIB_PYTHON_VERSION is '$DIB_PYTHON_VERSION' but needs to be 2 or 3"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
$apt_get install -y $to_install
|
||||
|
Loading…
Reference in New Issue
Block a user