Ticket #26872: zkServer.sh.patch
File zkServer.sh.patch, 2.0 KB (added by nrh@…, 14 years ago) |
---|
-
bin/zkServer.sh
old new 32 32 33 33 if [ "x$JMXDISABLE" = "x" ] 34 34 then 35 echo "JMX enabled by default" 35 echo "JMX enabled by default" >&2 36 36 # for some reason these two options are necessary on jdk6 on Ubuntu 37 37 # accord to the docs they are not necessary, but otw jconsole cannot 38 38 # do a local attach 39 39 ZOOMAIN="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.local.only=$JMXLOCALONLY org.apache.zookeeper.server.quorum.QuorumPeerMain" 40 40 else 41 echo "JMX disabled by user request" 41 echo "JMX disabled by user request" >&2 42 42 ZOOMAIN="org.apache.zookeeper.server.quorum.QuorumPeerMain" 43 43 fi 44 44 45 45 # Only follow symlinks if readlink supports it 46 # macos's readlink doesn't have -f 46 47 if readlink -f "$0" > /dev/null 2>&1 47 48 then 48 ZOOBIN=`readlink -f "$0"` 49 READLINK="readlink -f" 50 else 51 READLINK="readlink" 52 fi 53 54 if $READLINK "$0" > /dev/null 2>&1 55 then 56 ZOOBIN=`$READLINK "$0"` 49 57 else 50 58 ZOOBIN="$0" 51 59 fi … … 58 66 ZOOCFG="$ZOOCFGDIR/$2" 59 67 fi 60 68 69 # if we're given a more complicated path to the config 70 # don't assume it lives in $ZOOCFGDIR, just use it 71 if [ ! -z "$2" ] 72 then 73 if [ "`basename $2`" != "$2" ] 74 then 75 ZOOCFG="$2" 76 fi 77 fi 78 61 79 if $cygwin 62 80 then 63 81 ZOOCFG=`cygpath -wp "$ZOOCFG"` … … 67 85 KILL=kill 68 86 fi 69 87 70 echo "Using config: $ZOOCFG" 88 echo "Using config: $ZOOCFG" >&2 71 89 72 90 ZOOPIDFILE=$(grep dataDir "$ZOOCFG" | sed -e 's/.*=//')/zookeeper_server.pid 73 91 … … 80 98 /bin/echo -n $! > "$ZOOPIDFILE" 81 99 echo STARTED 82 100 ;; 101 start-foreground) 102 java "-Dzookeeper.log.dir=${ZOO_LOG_DIR}" "-Dzookeeper.root.logger=${ZOO_LOG4J_PROP}" \ 103 -cp "$CLASSPATH" $JVMFLAGS $ZOOMAIN "$ZOOCFG" 104 ;; 105 print-cmd) 106 echo "java -Dzookeeper.log.dir=\"${ZOO_LOG_DIR}\" -Dzookeeper.root.logger=\"${ZOO_LOG4J_PROP}\" -cp \"$CLASSPATH\" $JVMFLAGS $ZOOMAIN \"$ZOOCFG\"" 107 ;; 83 108 stop) 84 109 echo "Stopping zookeeper ... " 85 110 if [ ! -f "$ZOOPIDFILE" ]