]> git.ipfire.org Git - thirdparty/e2fsprogs.git/blob - debian/e2fsprogs.postrm.dh9
libext2fs: fix potential divide by zero bug caused by a lxcfs bug
[thirdparty/e2fsprogs.git] / debian / e2fsprogs.postrm.dh9
1 #!/bin/sh
2
3 update_svc() {
4 deb-systemd-helper mask "$1" >/dev/null || true
5
6 if deb-systemd-helper --quiet was-enabled "$1"; then
7 # Enables the unit on first installation, creates new
8 # symlinks on upgrades if the unit file has changed.
9 deb-systemd-helper disable "$1" >/dev/null || true
10 fi
11 }
12
13 if [ "$1" != "upgrade" ]; then
14 # Abort on error.
15 set -e
16
17 if [ -x /usr/sbin/update-initramfs -a \
18 -e /etc/initramfs-tools/initramfs.conf ]; then
19 update-initramfs -u
20 fi
21
22 #DEBHELPER#
23
24 # debhelper doesn't know what timers are...
25 update_svc e2scrub_all.timer
26 update_svc e2scrub_reap.service
27
28 # Start our new services
29 if [ -d /run/systemd/system ]; then
30 deb-systemd-invoke stop e2scrub_all.timer >/dev/null || true
31 fi
32 fi
33
34 exit 0
35