summaryrefslogtreecommitdiff
path: root/packaging/freebsd/pkg-install
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2008-10-26 21:19:34 -0400
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>2008-10-26 21:19:34 -0400
commitb1244f1dc98230fc04bde76a89e88d7fa0d08053 (patch)
tree7d891cfff04797f3bc4b6a32d9971eb172db32bf /packaging/freebsd/pkg-install
parent12dfa2eccb5489021507bf40447c4495decd9fd0 (diff)
tracking freebsd packaging from anarcat.
Diffstat (limited to 'packaging/freebsd/pkg-install')
-rwxr-xr-xpackaging/freebsd/pkg-install5
1 files changed, 3 insertions, 2 deletions
diff --git a/packaging/freebsd/pkg-install b/packaging/freebsd/pkg-install
index 940b796..5e520cd 100755
--- a/packaging/freebsd/pkg-install
+++ b/packaging/freebsd/pkg-install
@@ -24,7 +24,7 @@ POST-INSTALL)
GID=${UID}
SHELL=/usr/local/bin/bash
- if pw group show "${GROUP}" 2>/dev/null; then
+ if pw group show "${GROUP}" >/dev/null 2>&1; then
echo "You already have a group \"${GROUP}\", so I will use it."
else
if pw groupadd ${GROUP} -g ${GID}; then
@@ -35,7 +35,8 @@ POST-INSTALL)
fi
fi
- if oldshell=`pw user show "${USER}" 2>/dev/null`; then
+ if pw user show "${USER}" >/dev/null 2>&1; then
+ oldshell=`pw user show "${USER}" 2>/dev/null | cut -f10 -d:`
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'."