From b905cd4f8f9f47ba5b81f1b21bbf987303d30ab2 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Wed, 8 Aug 2018 10:43:44 -0400 Subject: [PATCH] debian: use dh_installsystemd instead of manual handling in the scripts Signed-off-by: Theodore Ts'o --- debian/e2fsprogs.postinst | 19 ------------------- debian/e2fsprogs.postrm | 35 ----------------------------------- debian/rules | 1 + 3 files changed, 1 insertion(+), 54 deletions(-) delete mode 100644 debian/e2fsprogs.postrm diff --git a/debian/e2fsprogs.postinst b/debian/e2fsprogs.postinst index e7acb0e..00ac363 100644 --- a/debian/e2fsprogs.postinst +++ b/debian/e2fsprogs.postinst @@ -10,23 +10,4 @@ fi #DEBHELPER# -# debhelper doesn't know what timers are... -update_svc() { - deb-systemd-helper unmask "$1" >/dev/null || true - - if deb-systemd-helper --quiet was-enabled "$1"; then - deb-systemd-helper enable "$1" >/dev/null || true - else - deb-systemd-helper update-state "$1" >/dev/null || true - fi -} -update_svc e2scrub_all.timer -update_svc e2scrub_reap.service - -# Start our new services -if [ -d /run/systemd/system ]; then - systemctl --system daemon-reload >/dev/null || true - deb-systemd-invoke start e2scrub_all.timer >/dev/null || true -fi - exit 0 diff --git a/debian/e2fsprogs.postrm b/debian/e2fsprogs.postrm deleted file mode 100644 index 32cb642..0000000 --- a/debian/e2fsprogs.postrm +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -update_svc() { - deb-systemd-helper mask "$1" >/dev/null || true - - if deb-systemd-helper --quiet was-enabled "$1"; then - # Enables the unit on first installation, creates new - # symlinks on upgrades if the unit file has changed. - deb-systemd-helper disable "$1" >/dev/null || true - fi -} - -if [ "$1" != "upgrade" ]; then - # Abort on error. - set -e - - if [ -x /usr/sbin/update-initramfs -a \ - -e /etc/initramfs-tools/initramfs.conf ]; then - update-initramfs -u - fi - - #DEBHELPER# - - # debhelper doesn't know what timers are... - update_svc e2scrub_all.timer - update_svc e2scrub_reap.service - - # Start our new services - if [ -d /run/systemd/system ]; then - deb-systemd-invoke stop e2scrub_all.timer >/dev/null || true - fi -fi - -exit 0 - diff --git a/debian/rules b/debian/rules index 5449f2b..9bdcad6 100755 --- a/debian/rules +++ b/debian/rules @@ -436,6 +436,7 @@ endif dh_compress -a dh_makeshlibs -a --add-udeb=e2fsprogs-udeb + dh_installsystemd -p e2fsprogs $(INSTALL) -D -p -m644 debian/e2fsprogs-udeb.lintian-overrides \ debian/e2fsprogs-udeb/usr/share/lintian/overrides/e2fsprogs-udeb -- 1.8.3.1