summaryrefslogtreecommitdiffstats
path: root/debian/systemd.postrm
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 02:25:51 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 02:25:51 +0000
commitac8399db6ce846597966360732ce6d39a247bdd2 (patch)
tree046a28d2cbd02afa147291e8f69e9bb5dc29f1aa /debian/systemd.postrm
parentAdding upstream version 241. (diff)
downloadsystemd-ac8399db6ce846597966360732ce6d39a247bdd2.tar.xz
systemd-ac8399db6ce846597966360732ce6d39a247bdd2.zip
Adding debian version 241-7~deb10u8.debian/241-7_deb10u8debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/systemd.postrm')
-rw-r--r--debian/systemd.postrm27
1 files changed, 27 insertions, 0 deletions
diff --git a/debian/systemd.postrm b/debian/systemd.postrm
new file mode 100644
index 0000000..94d77b4
--- /dev/null
+++ b/debian/systemd.postrm
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+ purge)
+ # clean up after manually enabled units in postinst
+ rm -f /etc/systemd/system/getty.target.wants/getty@tty1.service
+ rm -f /etc/systemd/system/multi-user.target.wants/remote-fs.target
+ rm -f /etc/systemd/system/sysinit.target.wants/systemd-timesyncd.service
+ rm -f /etc/systemd/system/dbus-org.freedesktop.timesync1.service
+ rmdir --ignore-fail-on-non-empty /etc/systemd/system/getty.target.wants 2> /dev/null || true
+ rmdir --ignore-fail-on-non-empty /etc/systemd/system/multi-user.target.wants 2> /dev/null || true
+ rmdir --ignore-fail-on-non-empty /etc/systemd/system/sysinit.target.wants 2> /dev/null || true
+
+ rm -f /var/lib/systemd/catalog/database
+ rmdir --ignore-fail-on-non-empty /var/lib/systemd/catalog 2> /dev/null || true
+
+ rm -rf /var/lib/systemd/backlight/
+ rm -rf /var/lib/systemd/rfkill/
+
+ rm -f /var/lib/systemd/clock
+ rm -f /var/lib/systemd/random-seed
+ ;;
+esac
+
+#DEBHELPER#