summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Vernon <matthew@debian.org>2023-02-24 10:44:52 +0000
committerMatthew Vernon <matthew@debian.org>2023-02-24 10:44:52 +0000
commit01402047c58cf6ef1bc12a39bb795d83685a7921 (patch)
tree2d9e8ba9c00bfb716468e48d96d726f494c3c0f9
parentd9ae568175f97894a2286ed86bf03c88c867c714 (diff)
Combine two clauses in postrm
(from gitlab review) both were calling the same dpkg-divert command.
-rw-r--r--debian/postrm9
1 files changed, 3 insertions, 6 deletions
diff --git a/debian/postrm b/debian/postrm
index c18f174..9855a21 100644
--- a/debian/postrm
+++ b/debian/postrm
@@ -41,12 +41,9 @@ case "$1" in
;;
esac
-if [ remove = "$1" ] || [ abort-install = "$1" ] || [ disappear = "$1" ]; then
- dpkg-divert --package orphan-sysvinit-scripts --remove --rename \
- --divert /usr/lib/rsyslog/rsyslog-rotate.real \
- /usr/lib/rsyslog/rsyslog-rotate
-elif [ abort-upgrade = "$1" ] &&
- dpkg --compare-versions "$2" lt "$diversion_added_ver"; then
+if [ remove = "$1" ] || [ abort-install = "$1" ] || [ disappear = "$1" ] ||
+ ( [ abort-upgrade = "$1" ] &&
+ dpkg --compare-versions "$2" lt "$diversion_added_ver" ); then
dpkg-divert --package orphan-sysvinit-scripts --remove --rename \
--divert /usr/lib/rsyslog/rsyslog-rotate.real \
/usr/lib/rsyslog/rsyslog-rotate