From: Garrett C. <yab...@us...> - 2009-11-12 11:56:18
|
Update of /cvsroot/ltp/ltp In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv4084 Modified Files: IDcheck.sh Log Message: 1. The logic check for IDcheck.sh was inverted for finding entries. 2. sys and users were being checked for in /etc/password, not /etc/group. Signed-off-by: Garrett Cooper <yan...@gm...> Index: IDcheck.sh =================================================================== RCS file: /cvsroot/ltp/ltp/IDcheck.sh,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** IDcheck.sh 10 Jul 2009 23:01:27 -0000 1.20 --- IDcheck.sh 12 Nov 2009 11:56:05 -0000 1.21 *************** *** 41,49 **** # find entry. fe() { ! ID=$1; shift ! FILE=$1; shift [ -e "$FILE" ] || return $? ! awk "/^$ID:/ { FOUND=1 } END { if (\$FOUND == 1) { exit 1; } exit 0; }" \ ! "$FILE" } --- 41,48 ---- # find entry. fe() { ! ID=$1 ! FILE=$2 [ -e "$FILE" ] || return $? ! grep -q "^$ID:" "$FILE" } *************** *** 55,60 **** read ans case "$ans" in ! Y*|y*) CREATE_ENTRIES=1 ;; ! *) CREATE_ENTRIES=0 ;; esac else --- 54,59 ---- read ans case "$ans" in ! Y*|y*) CREATE_ENTRIES=1 ;; ! *) CREATE_ENTRIES=0 ;; esac else *************** *** 165,169 **** # For entries that only exist in $group. for i in users sys; do ! if ! fe "$i" "$file"; then MISSING_ENTRY=1 fi --- 164,168 ---- # For entries that only exist in $group. for i in users sys; do ! if ! fe "$i" "$group" ; then MISSING_ENTRY=1 fi |