summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorC.J. Collier <cjcollier@linuxfoundation.org>2016-05-16 13:27:08 -0700
committerC.J. Collier <cjcollier@linuxfoundation.org>2016-05-16 20:49:13 +0000
commite44de7e68c15be32c9f391265f69d99d324a8b2f (patch)
treeb3830bdbd21af3bc2d0902b5739d554b7310c492
parent09963646f9b181f697dae472e6b04fb58125d758 (diff)
Correct init script to use sysv on 14.04
condition wrapped around code Change-Id: I27a426504fe5786e9a45d7145d9c3332b4542860 Signed-off-by: C.J. Collier <cjcollier@linuxfoundation.org>
-rw-r--r--vagrant/lib/bootstrap-functions.sh10
-rw-r--r--vagrant/lib/system_reseal.sh4
2 files changed, 11 insertions, 3 deletions
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