diff options
author | Daniel Kahn Gillmor <dkg@fifthhorseman.net> | 2008-09-14 19:50:18 -0400 |
---|---|---|
committer | Daniel Kahn Gillmor <dkg@fifthhorseman.net> | 2008-09-14 19:50:18 -0400 |
commit | b5e33d44a4a838b8212a156b28b186331e5e4adb (patch) | |
tree | 1466e580423fdb692541f1891d6fbfca3c0a7b95 /packaging/freebsd/pkg-install | |
parent | d454019309fb9887f40b2330866f26741b4e8078 (diff) |
forcing monkeysphere shell to bash for FreeBSD.
Diffstat (limited to 'packaging/freebsd/pkg-install')
-rwxr-xr-x | packaging/freebsd/pkg-install | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/packaging/freebsd/pkg-install b/packaging/freebsd/pkg-install index 6783ee8..940b796 100755 --- a/packaging/freebsd/pkg-install +++ b/packaging/freebsd/pkg-install @@ -22,6 +22,7 @@ POST-INSTALL) GROUP=${USER} UID=641 GID=${UID} + SHELL=/usr/local/bin/bash if pw group show "${GROUP}" 2>/dev/null; then echo "You already have a group \"${GROUP}\", so I will use it." @@ -34,8 +35,15 @@ POST-INSTALL) fi fi - if pw user show "${USER}" 2>/dev/null; then - echo "You already have a user \"${USER}\", so I will use it." + if oldshell=`pw user show "${USER}" 2>/dev/null`; then + if [ x"$oldshell" != x"$SHELL" ]; then + echo "You already have a \"${USER}\" user, but its shell is '$oldshell'." + echo "This package requires that \"${USER}\"'s shell be '$SHELL'." + echo "You should fix this by hand and then re-install the package." + echo " hint: pw usermod '$USER' -s '$SHELL'" + exit 1 + fi + echo "You already have a user \"${USER}\" with the proper shell, so I will use it." else if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \ -d "$VARLIB" -s /usr/local/bin/bash -c "monkeysphere authentication user,,," |