diff options
author | Daniel Kahn Gillmor <dkg@fifthhorseman.net> | 2008-10-26 21:19:34 -0400 |
---|---|---|
committer | Daniel Kahn Gillmor <dkg@fifthhorseman.net> | 2008-10-26 21:19:34 -0400 |
commit | b1244f1dc98230fc04bde76a89e88d7fa0d08053 (patch) | |
tree | 7d891cfff04797f3bc4b6a32d9971eb172db32bf /packaging/freebsd/pkg-install | |
parent | 12dfa2eccb5489021507bf40447c4495decd9fd0 (diff) |
tracking freebsd packaging from anarcat.
Diffstat (limited to 'packaging/freebsd/pkg-install')
-rwxr-xr-x | packaging/freebsd/pkg-install | 5 |
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'." |