diff options
author | Maxim Sobolev <sobomax@FreeBSD.org> | 2002-01-28 17:50:11 +0000 |
---|---|---|
committer | Maxim Sobolev <sobomax@FreeBSD.org> | 2002-01-28 17:50:11 +0000 |
commit | 5cee31d2620656b0cb2f1a2e896a2844f55d310b (patch) | |
tree | 309148a9b2f64d68a5576c3341de9fec869066fb | |
parent | Update to 1.0.13. (diff) |
Fix installation when /usr/sbin not in the PATH.
PR: 34289
Submitted by: Joe Marcus Clarke <marcus@marcuscom.com>
-rw-r--r-- | x11/gdm/pkg-install | 9 | ||||
-rw-r--r-- | x11/gdm2/pkg-install | 9 |
2 files changed, 10 insertions, 8 deletions
diff --git a/x11/gdm/pkg-install b/x11/gdm/pkg-install index 23dd7d7a68c7..56e5a86af3eb 100644 --- a/x11/gdm/pkg-install +++ b/x11/gdm/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}\"." 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}\"." |