summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/zsh.postinst14
-rw-r--r--debian/zsh.postrm11
2 files changed, 13 insertions, 12 deletions
diff --git a/debian/zsh.postinst b/debian/zsh.postinst
index 5993bc276..65a4d3141 100644
--- a/debian/zsh.postinst
+++ b/debian/zsh.postinst
@@ -6,6 +6,13 @@ case "$1" in
(configure)
add-shell /bin/zsh
add-shell /usr/bin/zsh
+
+ # New hardcoded symlinks which unfortunately can't be shipped inside
+ # the package itself since some people want to merge /bin and /usr/bin
+ # against FHS and all Unix tradition.
+ if [ ! -e /usr/bin/zsh -a ! -L /usr/bin/zsh ]; then
+ ln -s /bin/zsh /usr/bin/zsh
+ fi
;;
(abort-upgrade|abort-remove|abort-deconfigure)
exit 0
@@ -24,13 +31,6 @@ update-alternatives --remove ksh /bin/zsh4
update-alternatives --remove zsh /bin/zsh5
update-alternatives --remove rzsh /bin/zsh5
-# New hardcoded symlinks which unfortunately can't be shipped inside
-# the package itself since some people want to merge /bin and /usr/bin
-# against FHS and all Unix tradition.
-if [ ! -e /usr/bin/zsh -a ! -L /usr/bin/zsh ]; then
- ln -s /bin/zsh /usr/bin/zsh
-fi
-
#DEBHELPER#
exit 0
diff --git a/debian/zsh.postrm b/debian/zsh.postrm
index 82649c6ee..5991d7e53 100644
--- a/debian/zsh.postrm
+++ b/debian/zsh.postrm
@@ -6,12 +6,13 @@ case "$1" in
(remove)
remove-shell /bin/zsh
remove-shell /usr/bin/zsh
+
+ # Remove hardcoded symlink again
+ if [ -L /usr/bin/zsh ]; then
+ rm -f /usr/bin/zsh
+ fi
+
;;
esac
-# Remove hardcoded symlink again
-if [ -L /usr/bin/zsh ]; then
- rm -f /usr/bin/zsh
-fi
-
#DEBHELPER#