[Fedora-directory-commits] dsgw setup-ds-dsgw.in,1.3,1.4

Richard Allen Megginson (rmeggins) fedora-directory-commits at redhat.com
Thu Jan 31 23:51:49 UTC 2008


Author: rmeggins

Update of /cvs/dirsec/dsgw
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20864

Modified Files:
	setup-ds-dsgw.in 
Log Message:
attributes in LDIF may be in mixed case - sed cannot portably do case insensitive matching - just use a simple sed search and replace for ldif attributes


Index: setup-ds-dsgw.in
===================================================================
RCS file: /cvs/dirsec/dsgw/setup-ds-dsgw.in,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- setup-ds-dsgw.in	31 Jan 2008 21:43:36 -0000	1.3
+++ setup-ds-dsgw.in	31 Jan 2008 23:51:47 -0000	1.4
@@ -33,22 +33,22 @@
 getValFromInf() {
 	cattr=$1
 	cfile=$2
-	rval=`grep -i ^$cattr $cfile | head -1 | sed -e "s/^$cattr[ 	]*=[ 	]*//"`
+	rval=`grep ^$cattr $cfile | head -1 | sed -e "s/^$cattr[ 	]*=[ 	]*//"`
 	echo $rval
 }
 
 getValFromConf() {
 	cattr=$1
 	cfile=$2
-	rval=`grep -i ^$cattr $cfile | head -1 | sed -e "s/^$cattr[ 	]*//"`
+	rval=`grep ^$cattr $cfile | head -1 | sed -e "s/^$cattr[ 	]*//"`
 	echo $rval
 }
 
 getValFromLdif() {
 	cattr=$1
 	cfile=$2
-    num=${3:-1}
-	rval=`grep -i ^$cattr: $cfile | head -$num | sed -e "s/^$cattr:[ 	]*//"`
+	num=${3:-1}
+	rval=`grep -i ^$cattr: $cfile | head -$num | sed -e "s/^..*:[ 	]*//"`
 	echo $rval
 }
 
@@ -76,8 +76,8 @@
         httpurl="http://$host:$port"
     fi
     httpdconf=$admservdir/httpd.conf
-	dsgwuser=`ls -l $admservdir/local.conf | awk '{print $3}'`
-	dsgwgroup=`ls -l $admservdir/local.conf | awk '{print $4}'`
+    dsgwuser=`ls -l $admservdir/local.conf | awk '{print $3}'`
+    dsgwgroup=`ls -l $admservdir/local.conf | awk '{print $4}'`
 fi
 
 # see if there are any directory servers here




More information about the Fedora-directory-commits mailing list