Commit 33c6d2d8 authored by Patrick D. Hunt's avatar Patrick D. Hunt
Browse files

ZOOKEEPER-1744. clientPortAddress breaks "zkServer.sh status" (Nick Ohanian via phunt)

git-svn-id: https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.4@1535279 13f79535-47bb-0310-9956-ffa450edef68
parent 77e50094
......@@ -149,6 +149,9 @@ BUGFIXES:
ZOOKEEPER-1557. jenkins jdk7 test failure in
testBadSaslAuthNotifiesWatch (Eugene Koontz via phunt)
ZOOKEEPER-1744. clientPortAddress breaks "zkServer.sh status"
(Nick Ohanian via phunt)
IMPROVEMENTS:
ZOOKEEPER-1564. Allow JUnit test build with IBM Java
......
......@@ -161,9 +161,15 @@ restart)
;;
status)
# -q is necessary on some versions of linux where nc returns too quickly, and no stat result is output
clientPortAddress=`grep "^[[:space:]]*clientPortAddress[^[:alpha:]]" "$ZOOCFG" | sed -e 's/.*=//'`
if ! [ $clientPortAddress ]
then
clientPortAddress="localhost"
fi
clientPort=`grep "^[[:space:]]*clientPort[^[:alpha:]]" "$ZOOCFG" | sed -e 's/.*=//'`
STAT=`"$JAVA" "-Dzookeeper.log.dir=${ZOO_LOG_DIR}" "-Dzookeeper.root.logger=${ZOO_LOG4J_PROP}" \
-cp "$CLASSPATH" $JVMFLAGS org.apache.zookeeper.client.FourLetterWordMain localhost \
$(grep "^[[:space:]]*clientPort" "$ZOOCFG" | sed -e 's/.*=//') srvr 2> /dev/null \
-cp "$CLASSPATH" $JVMFLAGS org.apache.zookeeper.client.FourLetterWordMain \
$clientPortAddress $clientPort srvr 2> /dev/null \
| grep Mode`
if [ "x$STAT" = "x" ]
then
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment