From 339f61eee5a7b57955c29c37c88fff9b772b9e0a Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Fri, 9 Apr 2010 10:16:24 -0700 Subject: Don't remove vbash from /etc/shells during upgrade This postrm script is clone of bash.postrm --- debian/vyatta-bash.postrm | 20 ++++++++++++++++---- 1 file 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# -- cgit v1.2.3