diff options
Diffstat (limited to 'shells/bash3/pkg-deinstall')
-rw-r--r-- | shells/bash3/pkg-deinstall | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/shells/bash3/pkg-deinstall b/shells/bash3/pkg-deinstall new file mode 100644 index 000000000000..11ee3aff420d --- /dev/null +++ b/shells/bash3/pkg-deinstall @@ -0,0 +1,17 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +case $2 in +DEINSTALL) + if [ `id -u` -eq 0 ]; then + TMPSHELLS=`mktemp -t shells` + grep -v "^${PKG_PREFIX-/usr/local}/bin/bash\$" /etc/shells > "$TMPSHELLS" + cat "$TMPSHELLS" > /etc/shells + rm "$TMPSHELLS" + elif grep -qs "^${PKG_PREFIX-/usr/local}/bin/bash\$" /etc/shells; then + echo "Not root, please remove ${PKG_PREFIX-/usr/local}/bin/bash from /etc/shells manually" + fi + ;; +esac |