#!/bin/sh # # $FreeBSD: head/shells/psh/files/pkg-install.in 340719 2014-01-22 15:52:06Z mat $ # PSH="%%PREFIX%%/bin/psh" SHELLS="/etc/shells" case $2 in POST-INSTALL) if [ -d "${SHELLS%/*}" ] && ! grep -qs "^$PSH\$" "$SHELLS"; then if [ `id -u` -eq 0 ]; then echo "$PSH" >> "$SHELLS" else echo "Not root, please add $PSH to $SHELLS manually" fi fi ;; esac