pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/install Rewrite the code handling user and group cr...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/0e916b944267
branches:  trunk
changeset: 497405:0e916b944267
user:      tron <tron%pkgsrc.org@localhost>
date:      Wed Jul 27 11:54:03 2005 +0000

description:
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:

 mk/install/install |  18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diffs (36 lines):

diff -r cb305f56c7d8 -r 0e916b944267 mk/install/install
--- a/mk/install/install        Wed Jul 27 10:02:17 2005 +0000
+++ b/mk/install/install        Wed Jul 27 11:54:03 2005 +0000
@@ -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 @@
        # 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.



Home | Main Index | Thread Index | Old Index