summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/vyatta-bash.postrm20
1 files changed, 16 insertions, 4 deletions
diff --git a/debian/vyatta-bash.postrm b/debian/vyatta-bash.postrm
index 3d77a51..7039466 100644
--- a/debian/vyatta-bash.postrm
+++ b/debian/vyatta-bash.postrm
@@ -1,8 +1,20 @@
-#! /bin/sh -e
+#! /bin/sh
-if [ -x /usr/sbin/remove-shell ]; then
- /usr/sbin/remove-shell /bin/vbash
-fi
+set -e
+
+case "$1" in
+ upgrade|failed-upgrade|abort-install|abort-upgrade)
+ ;;
+ remove|purge|disappear)
+ if [ -x /usr/sbin/remove-shell ] && [ -f /etc/shells ]; then
+ /usr/sbin/remove-shell /bin/vbash
+ fi
+ ;;
+ *)
+ echo "postrm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
#DEBHELPER#