OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /v/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-tools                    Date:   29-Sep-2006 08:22:43
  Branch: HEAD                             Handle: 2006092907224300

  Modified files:
    openpkg-tools/cmd       dev.sh

  Log:
    be more efficient by performing direct lookups by key (if possible)
    instead of fetching the whole database; also add little bit of NIS+
    support

  Summary:
    Revision    Changes     Path
    1.81        +6  -2      openpkg-tools/cmd/dev.sh
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-tools/cmd/dev.sh
  ============================================================================
  $ cvs diff -u -r1.80 -r1.81 dev.sh
  --- openpkg-tools/cmd/dev.sh  29 Sep 2006 06:20:10 -0000      1.80
  +++ openpkg-tools/cmd/dev.sh  29 Sep 2006 06:22:43 -0000      1.81
  @@ -107,8 +107,12 @@
           fi
       fi
   fi
  -realname=`(getent passwd; cat /etc/passwd; ypcat passwd; nidump passwd .) 
2>/dev/null |\
  -          grep "^${username}:" | awk -F: '{ print $5; }'`
  +realname=`(getent passwd "${username}"; \
  +           grep "^${username}:" /etc/passwd; \
  +           ypmatch "${username}" passwd; \
  +           nismatch "${username}" passwd; \
  +           nidump passwd . | grep "^${username}:") 2>/dev/null |\
  +           sed -e 'q' | awk -F: '{ print $5; }'`
   if [ ".$realname" = . ]; then
       realname="unknown"
   fi
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     openpkg-cvs@openpkg.org

Reply via email to