diff options
author | tron <tron@pkgsrc.org> | 2005-07-27 11:54:03 +0000 |
---|---|---|
committer | tron <tron@pkgsrc.org> | 2005-07-27 11:54:03 +0000 |
commit | 95f029e269f54d2bc73857e0207ccc2a4339c8fd (patch) | |
tree | 139c1a4896ce26b6581d678740f7418557b6ed16 /mk/install | |
parent | 6c28b3c28b878c173ae334c2d94e17633b6f95fa (diff) | |
download | pkgsrc-95f029e269f54d2bc73857e0207ccc2a4339c8fd.tar.gz |
Rewrite the code handling user and group creation so it will not fail if
no user or group needs to be created. This fixes PR pkg/30849 by myself.
Diffstat (limited to 'mk/install')
-rw-r--r-- | mk/install/install | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/mk/install/install b/mk/install/install index 8f9febf617e..ae3daa576e5 100644 --- a/mk/install/install +++ b/mk/install/install @@ -1,7 +1,7 @@ # -*- sh -*- # start of install # -# $NetBSD: install,v 1.37 2005/03/21 19:29:46 wiz Exp $ +# $NetBSD: install,v 1.38 2005/07/27 11:54:03 tron Exp $ case ${STAGE} in PRE-INSTALL) @@ -9,15 +9,15 @@ PRE-INSTALL) # Require that necessary users and groups exist or else fail the # installation of the package. # - case ${_PKG_CREATE_USERGROUP} in - YES) ${TEST} -x ./+USERGROUP && - ./+USERGROUP ADD ${PKG_METADATA_DIR} ;; - esac - if ${TEST} -x ./+USERGROUP && - ./+USERGROUP CHECK-ADD ${PKG_METADATA_DIR}; then + if [ -x ./+USERGROUP ]; then + case ${_PKG_CREATE_USERGROUP} in + YES) ./+USERGROUP ADD ${PKG_METADATA_DIR} ;; + esac + if ./+USERGROUP CHECK-ADD ${PKG_METADATA_DIR}; then : - else - exit 1 + else + exit 1 + fi fi # # Create package directories at pre-install time. |