diff options
author | sobomax <sobomax@FreeBSD.org> | 2002-01-29 01:50:11 +0800 |
---|---|---|
committer | sobomax <sobomax@FreeBSD.org> | 2002-01-29 01:50:11 +0800 |
commit | 6cb4c15123c7acfda25ebf517ade8bc0048f5bf9 (patch) | |
tree | 989828fe35072a007a07295fec56b0300d5c1764 /x11/gdm2 | |
parent | 3a81dbd76fc058a2676ed7de5431468edfc98eb5 (diff) | |
download | freebsd-ports-gnome-6cb4c15123c7acfda25ebf517ade8bc0048f5bf9.tar.gz freebsd-ports-gnome-6cb4c15123c7acfda25ebf517ade8bc0048f5bf9.tar.zst freebsd-ports-gnome-6cb4c15123c7acfda25ebf517ade8bc0048f5bf9.zip |
Fix installation when /usr/sbin not in the PATH.
PR: 34289
Submitted by: Joe Marcus Clarke <marcus@marcuscom.com>
Diffstat (limited to 'x11/gdm2')
-rw-r--r-- | x11/gdm2/pkg-install | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/x11/gdm2/pkg-install b/x11/gdm2/pkg-install index 23dd7d7a68c7..56e5a86af3eb 100644 --- a/x11/gdm2/pkg-install +++ b/x11/gdm2/pkg-install @@ -9,11 +9,12 @@ if [ "$2" = "POST-INSTALL" ]; then GROUP=${USER} UID=91 GID=${UID} + PW=/usr/sbin/pw - if pw group show "${GROUP}" 2>/dev/null; then + if ${PW} group show "${GROUP}" 2>/dev/null; then echo "You already have a group \"${GROUP}\", so I will use it." else - if pw groupadd ${GROUP} -g ${GID}; then + if ${PW} groupadd ${GROUP} -g ${GID}; then echo "Added group \"${GROUP}\"." else echo "Adding group \"${GROUP}\" failed..." @@ -21,10 +22,10 @@ if [ "$2" = "POST-INSTALL" ]; then fi fi - if pw user show "${USER}" 2>/dev/null; then + if ${PW} user show "${USER}" 2>/dev/null; then echo "You already have a user \"${USER}\", so I will use it." else - if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \ + if ${PW} useradd ${USER} -u ${UID} -g ${GROUP} -h - \ -d "/nonexistent" -s /sbin/nologin -c "GNOME Display Manager" then echo "Added user \"${USER}\"." |