From: C.J. Collier Date: Mon, 16 May 2016 20:27:08 +0000 (-0700) Subject: Correct init script to use sysv on 14.04 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F59%2F1159%2F2;p=ci-management.git Correct init script to use sysv on 14.04 condition wrapped around code Change-Id: I27a426504fe5786e9a45d7145d9c3332b4542860 Signed-off-by: C.J. Collier --- diff --git a/vagrant/lib/bootstrap-functions.sh b/vagrant/lib/bootstrap-functions.sh index 121a420b5..d8c273d65 100644 --- a/vagrant/lib/bootstrap-functions.sh +++ b/vagrant/lib/bootstrap-functions.sh @@ -173,8 +173,14 @@ deb_remove_pkgs() { deb_disable_apt_systemd_daily() { echo '---> Stopping and disabling apt.systemd.daily to avoid it locking /var/lib/dpkg/lock' - systemctl stop apt.systemd.daily - systemctl disable apt.systemd.daily + if [ -f /usr/bin/systemctl ] + then + systemctl stop apt.systemd.daily + systemctl disable apt.systemd.daily + else + /etc/init.d/unattended-upgrades stop + update-rc.d -f unattended-upgrades remove + fi } rh_clean_pkgs() { diff --git a/vagrant/lib/system_reseal.sh b/vagrant/lib/system_reseal.sh index 566294a66..6c7aa4d52 100644 --- a/vagrant/lib/system_reseal.sh +++ b/vagrant/lib/system_reseal.sh @@ -38,7 +38,7 @@ rm -rf /etc/Pegasus/*.cnf /etc/Pegasus/*.crt /etc/Pegasus/*.csr \ /var/log/secure* /var/log/setroubleshoot/*.log \ /var/log/spooler* /var/log/squid/*.log /var/log/syslog* \ /var/log/tallylog* /var/log/tuned/tuned.log /var/log/wtmp* \ - /var/named/data/named.run /var/lib/dpkg/lock + /var/named/data/named.run rm -rf ~/.viminfo /etc/ssh/ssh*key* ~/.ssh/* /root/.ssh/* @@ -56,3 +56,5 @@ sleep 10 echo "********************************************" echo "* PLEASE SNAPSHOT IMAGE AT THIS TIME *" echo "********************************************" +init 1 +sleep 10