diff options
Diffstat (limited to 'autoscripts/postinst-systemd-dont-enable')
-rw-r--r-- | autoscripts/postinst-systemd-dont-enable | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/autoscripts/postinst-systemd-dont-enable b/autoscripts/postinst-systemd-dont-enable index 2dd86a1f..f88901e1 100644 --- a/autoscripts/postinst-systemd-dont-enable +++ b/autoscripts/postinst-systemd-dont-enable @@ -1,13 +1,15 @@ -if deb-systemd-helper debian-installed #UNITFILE#; then - # This will only remove masks created by d-s-h on package removal. - deb-systemd-helper unmask #UNITFILE# >/dev/null || true +if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then + if deb-systemd-helper debian-installed #UNITFILE#; then + # This will only remove masks created by d-s-h on package removal. + deb-systemd-helper unmask #UNITFILE# >/dev/null || true - if deb-systemd-helper --quiet was-enabled #UNITFILE#; then - # Create new symlinks, if any. - deb-systemd-helper enable #UNITFILE# >/dev/null || true + if deb-systemd-helper --quiet was-enabled #UNITFILE#; then + # Create new symlinks, if any. + deb-systemd-helper enable #UNITFILE# >/dev/null || true + fi fi -fi -# Update the statefile to add new symlinks (if any), which need to be cleaned -# up on purge. Also remove old symlinks. -deb-systemd-helper update-state #UNITFILE# >/dev/null || true + # Update the statefile to add new symlinks (if any), which need to be cleaned + # up on purge. Also remove old symlinks. + deb-systemd-helper update-state #UNITFILE# >/dev/null || true +fi |