TT#23803 TT#23872 Ensure package list is up to date before installing sysvinit-core

Otherwise might fail with:

| $ cat /var/log/cloud-init-output.log
| [...]
| Package sysvinit-core is not available, but is referred to by another package.
| This may mean that the package is missing, has been obsoleted, or
| is only available from another source
| However the following packages replace it:
|   systemd-sysv
|
| E: Package 'sysvinit-core' has no installation candidate

While at it switch from apt-get to apt.

Change-Id: I6654a1a09fea2a963ca4fc7da26fe1d343462a07
changes/23/16523/1
Michael Prokop 8 years ago
parent 6b85f0b510
commit 2f0b311563

@ -324,7 +324,8 @@ dpkg -i /tmp/ngcp-installer.deb
if [ -d /run/systemd/system ] ; then
echo "Switching from systemd to sysvinit (pre-reboot)"
apt-get install --yes sysvinit-core
apt update
apt install --yes sysvinit-core
echo "Rebooting now to switch from systemd to sysvinit"
reboot
fi

Loading…
Cancel
Save