[debhelper-devel] [debhelper] 01/01: autoscripts/postinst-*: Handle all current abort-* cases
Niels Thykier
nthykier at moszumanska.debian.org
Sat Jan 20 12:35:21 UTC 2018
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository debhelper.
commit dc8a46399352a057cb8fcb01511a14fff8e0c630
Author: Niels Thykier <niels at thykier.net>
Date: Sat Jan 20 12:23:22 2018 +0000
autoscripts/postinst-*: Handle all current abort-* cases
Signed-off-by: Niels Thykier <niels at thykier.net>
---
autoscripts/postinst-emacsen | 2 +-
autoscripts/postinst-icons | 6 ++++--
autoscripts/postinst-init | 2 +-
autoscripts/postinst-init-nostart | 2 +-
autoscripts/postinst-init-restart | 2 +-
autoscripts/postinst-init-tmpfiles | 2 +-
autoscripts/postinst-modules | 2 +-
autoscripts/postinst-systemd-dont-enable | 2 +-
autoscripts/postinst-systemd-enable | 2 +-
autoscripts/postinst-systemd-restart | 4 ++--
autoscripts/postinst-systemd-restartnostart | 2 +-
autoscripts/postinst-systemd-start | 2 +-
autoscripts/postinst-usrlocal | 2 +-
autoscripts/postinst-wm | 2 +-
autoscripts/postinst-wm-noman | 2 +-
15 files changed, 19 insertions(+), 17 deletions(-)
diff --git a/autoscripts/postinst-emacsen b/autoscripts/postinst-emacsen
index f6e92f6..0d3fd13 100644
--- a/autoscripts/postinst-emacsen
+++ b/autoscripts/postinst-emacsen
@@ -1,4 +1,4 @@
-if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] ; then
+if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
if [ -e /var/lib/emacsen-common/state/package/installed/emacsen-common -a -x /usr/lib/emacsen-common/emacs-package-install ] ; then
/usr/lib/emacsen-common/emacs-package-install --postinst #PACKAGE#
fi
diff --git a/autoscripts/postinst-icons b/autoscripts/postinst-icons
index 9e00f03..aa2eed0 100644
--- a/autoscripts/postinst-icons
+++ b/autoscripts/postinst-icons
@@ -1,3 +1,5 @@
-if which update-icon-caches >/dev/null 2>&1 ; then
- update-icon-caches #DIRLIST#
+if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
+ if which update-icon-caches >/dev/null 2>&1 ; then
+ update-icon-caches #DIRLIST#
+ fi
fi
diff --git a/autoscripts/postinst-init b/autoscripts/postinst-init
index 9652c77..0cf4085 100644
--- a/autoscripts/postinst-init
+++ b/autoscripts/postinst-init
@@ -1,4 +1,4 @@
-if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then
+if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
if [ -x "/etc/init.d/#SCRIPT#" ]; then
update-rc.d #SCRIPT# #INITPARMS# >/dev/null
invoke-rc.d #SCRIPT# start || #ERROR_HANDLER#
diff --git a/autoscripts/postinst-init-nostart b/autoscripts/postinst-init-nostart
index 687a4f6..820a106 100644
--- a/autoscripts/postinst-init-nostart
+++ b/autoscripts/postinst-init-nostart
@@ -1,4 +1,4 @@
-if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then
+if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
if [ -x "/etc/init.d/#SCRIPT#" ]; then
update-rc.d #SCRIPT# #INITPARMS# >/dev/null || #ERROR_HANDLER#
fi
diff --git a/autoscripts/postinst-init-restart b/autoscripts/postinst-init-restart
index 3fffa30..3eadaf6 100644
--- a/autoscripts/postinst-init-restart
+++ b/autoscripts/postinst-init-restart
@@ -1,4 +1,4 @@
-if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then
+if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
if [ -x "/etc/init.d/#SCRIPT#" ]; then
update-rc.d #SCRIPT# #INITPARMS# >/dev/null
if [ -n "$2" ]; then
diff --git a/autoscripts/postinst-init-tmpfiles b/autoscripts/postinst-init-tmpfiles
index 9bce94c..f258293 100644
--- a/autoscripts/postinst-init-tmpfiles
+++ b/autoscripts/postinst-init-tmpfiles
@@ -1,4 +1,4 @@
-if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then
+if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
# In case this system is running systemd, we need to ensure that all
# necessary tmpfiles (if any) are created before starting.
if [ -d /run/systemd/system ] ; then
diff --git a/autoscripts/postinst-modules b/autoscripts/postinst-modules
index 0b93045..9f8d205 100644
--- a/autoscripts/postinst-modules
+++ b/autoscripts/postinst-modules
@@ -1,4 +1,4 @@
-if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] ; then
+if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
if [ -e /boot/System.map-#KVERS# ]; then
depmod -a -F /boot/System.map-#KVERS# #KVERS# || true
fi
diff --git a/autoscripts/postinst-systemd-dont-enable b/autoscripts/postinst-systemd-dont-enable
index f88901e..6ecec62 100644
--- a/autoscripts/postinst-systemd-dont-enable
+++ b/autoscripts/postinst-systemd-dont-enable
@@ -1,4 +1,4 @@
-if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then
+if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; 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
diff --git a/autoscripts/postinst-systemd-enable b/autoscripts/postinst-systemd-enable
index 4900fb8..c0b2574 100644
--- a/autoscripts/postinst-systemd-enable
+++ b/autoscripts/postinst-systemd-enable
@@ -1,4 +1,4 @@
-if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then
+if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
# This will only remove masks created by d-s-h on package removal.
deb-systemd-helper unmask #UNITFILE# >/dev/null || true
diff --git a/autoscripts/postinst-systemd-restart b/autoscripts/postinst-systemd-restart
index bf8c7d9..a619055 100644
--- a/autoscripts/postinst-systemd-restart
+++ b/autoscripts/postinst-systemd-restart
@@ -1,6 +1,6 @@
-if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then
+if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
if [ -d /run/systemd/system ]; then
- systemctl --system daemon-reload >/dev/null || true
+ systemctl --system daemon-reload >/dev/null || true
if [ -n "$2" ]; then
_dh_action=restart
else
diff --git a/autoscripts/postinst-systemd-restartnostart b/autoscripts/postinst-systemd-restartnostart
index d41ef52..8ac28fb 100644
--- a/autoscripts/postinst-systemd-restartnostart
+++ b/autoscripts/postinst-systemd-restartnostart
@@ -1,4 +1,4 @@
-if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then
+if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
if [ -d /run/systemd/system ]; then
systemctl --system daemon-reload >/dev/null || true
if [ -n "$2" ]; then
diff --git a/autoscripts/postinst-systemd-start b/autoscripts/postinst-systemd-start
index ffc7216..6a24ad8 100644
--- a/autoscripts/postinst-systemd-start
+++ b/autoscripts/postinst-systemd-start
@@ -1,4 +1,4 @@
-if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] ; then
+if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
if [ -d /run/systemd/system ]; then
systemctl --system daemon-reload >/dev/null || true
deb-systemd-invoke start #UNITFILES# >/dev/null || true
diff --git a/autoscripts/postinst-usrlocal b/autoscripts/postinst-usrlocal
index 6c65e24..ca20748 100644
--- a/autoscripts/postinst-usrlocal
+++ b/autoscripts/postinst-usrlocal
@@ -1,4 +1,4 @@
-if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then
+if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ]; then
(
while read line; do
set -- $line
diff --git a/autoscripts/postinst-wm b/autoscripts/postinst-wm
index 7fa6aa2..be00872 100644
--- a/autoscripts/postinst-wm
+++ b/autoscripts/postinst-wm
@@ -1,4 +1,4 @@
-if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then
+if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ]; then
update-alternatives --install /usr/bin/x-window-manager \
x-window-manager #WM# #PRIORITY# \
--slave /usr/share/man/man1/x-window-manager.1.gz \
diff --git a/autoscripts/postinst-wm-noman b/autoscripts/postinst-wm-noman
index 3c26ea4..07e8d9a 100644
--- a/autoscripts/postinst-wm-noman
+++ b/autoscripts/postinst-wm-noman
@@ -1,4 +1,4 @@
-if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then
+if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
update-alternatives --install /usr/bin/x-window-manager \
x-window-manager #WM# #PRIORITY#
fi
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debhelper/debhelper.git
More information about the debhelper-devel
mailing list