TT#36177 Switch to sysvinit only with releases not supporting systemd

Starting with mr6.2 we use and support systemd, so there's no
point in switching to sysvinit.

Change-Id: Id2ad0cdb30d78be051c855eb3ad7c9061ac7d37c
changes/37/21037/1
Michael Prokop 7 years ago
parent c23bc372d0
commit f49ba9a7b0

@ -329,6 +329,17 @@ fi
AMI_DESCRIPTION="Official sip:provider CE AMI for release ${NGCP_VERSION} [${DATE_STRING}]"
case "$NGCP_RELEASE" in
2.*|3.*|mr3.*|mr4.*|mr5.*|mr6.0*|mr6.1*)
echo "*** ngcp release $NGCP_RELEASE doesn't support systemd"
SYSTEMD_SUPPORT=false
;;
*)
echo "*** ngcp release $NGCP_RELEASE supports systemd"
SYSTEMD_SUPPORT=true
;;
esac
USER_DATA_FILE="$(mktemp)"
cat > "$USER_DATA_FILE" << EOF
#!/bin/bash
@ -336,7 +347,7 @@ wget -O /tmp/ngcp-installer.deb http://deb.sipwise.com/spce/ngcp-installer-${NGC
dpkg -i /tmp/ngcp-installer.deb
sed -i 's/cdn-aws.deb.debian.org/deb.debian.org/' /etc/apt/sources.list
if [ -d /run/systemd/system ] ; then
if [ "$SYSTEMD_SUPPORT" = "false" ] && [ -d /run/systemd/system ] ; then
echo "Switching from systemd to sysvinit (pre-reboot)"
apt update
apt install --yes sysvinit-core

Loading…
Cancel
Save