From 5ea1b2bd1c57f9d3095252229c4ba1e50a7248d6 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Wed, 29 Apr 2015 16:01:30 +0200 Subject: [PATCH] Cleanup hwclock-save.service symlinks when upgrading from the jessie version --- debian/changelog | 2 ++ debian/systemd.postinst | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/debian/changelog b/debian/changelog index 027d50662..c1db17751 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,8 @@ systemd (219-8) UNRELEASED; urgency=medium dependency via Build-Depends-Package. * Revert "Make apparmor run before networking". This causes dependency cycles while apparmor still depends on $remote_fs. + * Cleanup hwclock-save.service symlinks when upgrading from the jessie + version. [ Martin Pitt ] * cryptsetup: Implement offset and skip options. (Closes: #751707, diff --git a/debian/systemd.postinst b/debian/systemd.postinst index cec2c53aa..325edc515 100644 --- a/debian/systemd.postinst +++ b/debian/systemd.postinst @@ -168,4 +168,11 @@ if dpkg --compare-versions "$2" lt-nl "219-4" && \ fi fi +# Cleanup hwclock-save.service, which was shipped in jessie. +if dpkg --compare-versions "$2" lt-nl "219-8"; then + for t in reboot halt poweroff ; do + rm -f /etc/systemd/system/${t}.target.wants/hwclock-save.service + rmdir --ignore-fail-on-non-empty /etc/systemd/system/${t}.target.wants 2> /dev/null || true + done +fi #DEBHELPER# -- 2.39.5