ee518f4189
- Use DATADIR in pkg-plist - Move pkg-install and pkg-deinstall to files/ and use SUB_FILES - Change MASTER_SITES to use MASTER_SITE_PERL_CPAN PR: ports/115281 [1] Submitted by: Felippe de Meirelles Motta <lippe@freebsdbrasil.com.br> [1]
22 lines
403 B
Bash
22 lines
403 B
Bash
#!/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
|