From 964aeaa9c1eac3fafa73ef9abf344613a093cb06 Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Fri, 4 Mar 2016 00:01:08 -0500 Subject: postinst/preinst: cleanup old multi-user.target enabled files also, actually enable the services. now this will have them enabled in the cloud-init.target. --- packages/debian/cloud-init.postinst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 packages/debian/cloud-init.postinst (limited to 'packages/debian/cloud-init.postinst') diff --git a/packages/debian/cloud-init.postinst b/packages/debian/cloud-init.postinst new file mode 100644 index 00000000..f1222b42 --- /dev/null +++ b/packages/debian/cloud-init.postinst @@ -0,0 +1,17 @@ +#!/bin/sh +set -x +cleanup_lp1552999() { + local oldver="$1" last_bad_ver="0.7.7~bzr1178" + dpkg --compare-versions "$oldver" le "$last_bad_ver" || return 0 + local edir="/etc/systemd/system/multi-user.target.wants" + rm -f "$edir/cloud-config.service" "$edir/cloud-final.service" \ + "$edir/cloud-init-local.service" "$edir/cloud-init.service" +} + + +#DEBHELPER# + +if [ "$1" = "configure" ]; then + oldver="$2" + cleanup_lp1552999 "$oldver" +fi -- cgit v1.2.3