#!/bin/sh # # $FreeBSD$ # PSH="%%PREFIX%%/bin/psh" SHELLS="/etc/shells" case $2 in DEINSTALL) if grep -qs "^$PSH\$" "$SHELLS"; then if [ `id -u` -eq 0 ]; then TMPSHELLS=`mktemp -t shells` grep -v "^$PSH\$" "$SHELLS" > "$TMPSHELLS" cat "$TMPSHELLS" > "$SHELLS" rm "$TMPSHELLS" else echo "Not root, please remove $PSH from $SHELLS manually" fi fi ;; esac