Ensure services won't be started from apt during image setup
diff --git a/ubuntu-16.04/scripts/base.sh b/ubuntu-16.04/scripts/base.sh
index aad1d84..5c4c20d 100644
--- a/ubuntu-16.04/scripts/base.sh
+++ b/ubuntu-16.04/scripts/base.sh
@@ -2,6 +2,8 @@
# Remove unwanted ubuntu security repository
#sed -i '/.*security\.ubuntu.com.*/d' /etc/apt/sources.list
+echo "exit 101" > /usr/sbin/policy-rc.d
+chmod +x /usr/sbin/policy-rc.d
apt-get update
# Cleanup old kernels, ensure latest is installed via virtual package
diff --git a/ubuntu-16.04/scripts/cleanup.sh b/ubuntu-16.04/scripts/cleanup.sh
index 3609b47..4bc6fcc 100644
--- a/ubuntu-16.04/scripts/cleanup.sh
+++ b/ubuntu-16.04/scripts/cleanup.sh
@@ -1,6 +1,8 @@
apt-get -y autoremove --purge
apt-get -y clean
+rm -f /usr/sbin/policy-rc.d || true
+
echo "cleaning up hostname"
sed -i "/.*ubuntu-1604.*/d" /etc/hosts
@@ -8,7 +10,7 @@
rm -rf VBoxGuestAdditions_*.iso VBoxGuestAdditions_*.iso.? || true
echo "cleaning up dhcp leases"
-rm /var/lib/dhcp/* || true
+rm -f /var/lib/dhcp/* || true
echo "cleaning up udev rules"
rm -f /etc/udev/rules.d/70-persistent-net.rules || true