zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maha...@apache.org
Subject svn commit: r1150937 - in /zookeeper/trunk: CHANGES.txt bin/zkCleanup.sh bin/zkServer.sh
Date Mon, 25 Jul 2011 22:19:08 GMT
Author: mahadev
Date: Mon Jul 25 22:19:08 2011
New Revision: 1150937

URL: http://svn.apache.org/viewvc?rev=1150937&view=rev
Log:
ZOOKEEPER-1119. zkServer stop command incorrectly reading comment lines in zoo.cfg (phunt
via mahadev)

Modified:
    zookeeper/trunk/CHANGES.txt
    zookeeper/trunk/bin/zkCleanup.sh
    zookeeper/trunk/bin/zkServer.sh

Modified: zookeeper/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/zookeeper/trunk/CHANGES.txt?rev=1150937&r1=1150936&r2=1150937&view=diff
==============================================================================
--- zookeeper/trunk/CHANGES.txt (original)
+++ zookeeper/trunk/CHANGES.txt Mon Jul 25 22:19:08 2011
@@ -263,6 +263,9 @@ BUGFIXES: 
   ZOOKEEPER-1134. ClientCnxnSocket string comparison using == rather than equals.
   (phunt via mahadev) 
 
+  ZOOKEEPER-1119. zkServer stop command incorrectly reading comment lines in
+  zoo.cfg (phunt via mahadev)
+
 IMPROVEMENTS:
   ZOOKEEPER-724. Improve junit test integration - log harness information 
   (phunt via mahadev)

Modified: zookeeper/trunk/bin/zkCleanup.sh
URL: http://svn.apache.org/viewvc/zookeeper/trunk/bin/zkCleanup.sh?rev=1150937&r1=1150936&r2=1150937&view=diff
==============================================================================
--- zookeeper/trunk/bin/zkCleanup.sh (original)
+++ zookeeper/trunk/bin/zkCleanup.sh Mon Jul 25 22:19:08 2011
@@ -36,8 +36,8 @@ ZOOBINDIR=`dirname "$ZOOBIN"`
 
 . "$ZOOBINDIR"/zkEnv.sh
 
-ZOODATADIR=$(grep '^dataDir=' "$ZOOCFG" | sed -e 's/.*=//')
-ZOODATALOGDIR=$(grep '^dataLogDir=' "$ZOOCFG" | sed -e 's/.*=//')
+ZOODATADIR=$(grep "^[[:space:]]*dataDir=" "$ZOOCFG" | sed -e 's/.*=//')
+ZOODATALOGDIR=$(grep "^[[:space:]]*dataLogDir=" "$ZOOCFG" | sed -e 's/.*=//')
 
 if [ "x$ZOODATALOGDIR" = "x" ]
 then

Modified: zookeeper/trunk/bin/zkServer.sh
URL: http://svn.apache.org/viewvc/zookeeper/trunk/bin/zkServer.sh?rev=1150937&r1=1150936&r2=1150937&view=diff
==============================================================================
--- zookeeper/trunk/bin/zkServer.sh (original)
+++ zookeeper/trunk/bin/zkServer.sh Mon Jul 25 22:19:08 2011
@@ -81,7 +81,7 @@ fi
 echo "Using config: $ZOOCFG" >&2
 
 if [ -z $ZOOPIDFILE ]; then
-    ZOO_DATADIR=$(grep dataDir "$ZOOCFG" | sed -e 's/.*=//')
+    ZOO_DATADIR=$(grep "^[[:space:]]*dataDir" "$ZOOCFG" | sed -e 's/.*=//')
     if [ ! -d "$ZOO_DATADIR" ]; then
         mkdir -p "$ZOO_DATADIR"
     fi
@@ -154,7 +154,7 @@ restart)
     ;;
 status)
     # -q is necessary on some versions of linux where nc returns too quickly, and no stat
result is output
-    STAT=`echo stat | nc -q 1 localhost $(grep clientPort "$ZOOCFG" | sed -e 's/.*=//') 2>
/dev/null| grep Mode`
+    STAT=`echo stat | nc -q 1 localhost $(grep "^[[:space:]]*clientPort" "$ZOOCFG" | sed
-e 's/.*=//') 2> /dev/null| grep Mode`
     if [ "x$STAT" = "x" ]
     then
         echo "Error contacting service. It is probably not running."



Mime
View raw message