summaryrefslogtreecommitdiff
path: root/packaging/freebsd/pkg-install
diff options
context:
space:
mode:
authorJameson Graef Rollins <jrollins@phys.columbia.edu>2008-10-26 23:10:14 -0400
committerJameson Graef Rollins <jrollins@phys.columbia.edu>2008-10-26 23:10:14 -0400
commit5a8f2f1b6e5557ef8680bd1025239dcfd3f6550f (patch)
tree6620d37c2617a0c61325f8113424994ac41f073f /packaging/freebsd/pkg-install
parent88b92e7c69e2c59ece19ff015d150e179c797655 (diff)
parentb1244f1dc98230fc04bde76a89e88d7fa0d08053 (diff)
Merge commit 'dkg/master'
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'."