summaryrefslogtreecommitdiff
path: root/debian/cloud-init.preinst
diff options
context:
space:
mode:
authorScott Moser <smoser@brickies.net>2016-08-23 16:48:39 -0400
committerScott Moser <smoser@brickies.net>2016-08-23 16:48:39 -0400
commitdbae06eec6a25592593f19f4f40bd03668098d9c (patch)
treeb1e09afe59d730abc3692c92a632cd63bba13581 /debian/cloud-init.preinst
parent90de5dfa9685a9585b651c38b21274a9aa05ec38 (diff)
downloadvyos-cloud-init-dbae06eec6a25592593f19f4f40bd03668098d9c.tar.gz
vyos-cloud-init-dbae06eec6a25592593f19f4f40bd03668098d9c.zip
Import version 0.7.7~bzr1176-0ubuntu1
Imported using git-dsc-commit.
Diffstat (limited to 'debian/cloud-init.preinst')
-rw-r--r--debian/cloud-init.preinst15
1 files changed, 14 insertions, 1 deletions
diff --git a/debian/cloud-init.preinst b/debian/cloud-init.preinst
index e383c092..c8406e31 100644
--- a/debian/cloud-init.preinst
+++ b/debian/cloud-init.preinst
@@ -1,7 +1,6 @@
#!/bin/sh
set -e
-#DEBHELPER#
# Remove a no-longer used conffile
rm_conffile() {
local PKGNAME="$1"
@@ -172,6 +171,16 @@ EOM
fi
}
+cleanup_lp1552999() {
+ local oldver="$1" last_bad_ver="0.7.7~bzr1178"
+ dpkg --compare-versions "$oldver" le "$last_bad_ver" || return 0
+ local hdir="/var/lib/systemd/deb-systemd-helper-enabled"
+ hdir="$hdir/multi-user.target.wants"
+ local edir="/etc/systemd/system/multi-user.target.wants"
+ rm -f "$hdir/cloud-config.service" "$hdir/cloud-final.service" \
+ "$hdir/cloud-init-local.service" "$hdir/cloud-init.service"
+}
+
case "$1" in
install|upgrade)
# removing obsolete conffiles from the 'ec2-init' package
@@ -238,4 +247,8 @@ case "$1" in
[ -d "${d}/cloud.cfg.d" ] || mkdir "${d}/cloud.cfg.d"
mv "$d/distro.cfg" "$d/cloud.cfg.d/90_dpkg.cfg"
fi
+
+ cleanup_lp1552999 "$oldver"
esac
+
+#DEBHELPER#