summaryrefslogtreecommitdiff
path: root/packaging/freebsd/pkg-install
diff options
context:
space:
mode:
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'."