diff options
Diffstat (limited to 'debian/vyatta-bash.postrm')
-rw-r--r-- | debian/vyatta-bash.postrm | 20 |
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# |