Explorar el Código

ZOOKEEPER-303. Bin scripts dont work on a Mac. (tom white via mahadev)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/zookeeper/trunk@743050 13f79535-47bb-0310-9956-ffa450edef68
Mahadev Konar hace 16 años
padre
commit
29400c0f6a
Se han modificado 4 ficheros con 23 adiciones y 4 borrados
  1. 2 1
      CHANGES.txt
  2. 7 1
      bin/zkCleanup.sh
  3. 7 1
      bin/zkCli.sh
  4. 7 1
      bin/zkServer.sh

+ 2 - 1
CHANGES.txt

@@ -7,7 +7,8 @@ BUGFIXES:
 Backward compatibile changes:
 
 BUGFIXES: 
-
+  ZOOKEEPER-303. Bin scripts dont work on a Mac. (tom white via mahadev)
+ 
 IMPROVEMENTS:
 
 NEW FEATURES:

+ 7 - 1
bin/zkCleanup.sh

@@ -25,7 +25,13 @@
 # relative to the canonical path of this script.
 #
 
-ZOOBIN=`readlink -f "$0"`
+# Only follow symlinks if readlink supports it
+if readlink -f "$0" > /dev/null 2>&1
+then
+  ZOOBIN=`readlink -f "$0"`
+else
+  ZOOBIN="$0"
+fi
 ZOOBINDIR=`dirname "$ZOOBIN"`
 
 . $ZOOBINDIR/zkEnv.sh

+ 7 - 1
bin/zkCli.sh

@@ -25,7 +25,13 @@
 # relative to the canonical path of this script.
 #
 
-ZOOBIN=`readlink -f "$0"`
+# Only follow symlinks if readlink supports it
+if readlink -f "$0" > /dev/null 2>&1
+then
+  ZOOBIN=`readlink -f "$0"`
+else
+  ZOOBIN="$0"
+fi
 ZOOBINDIR=`dirname "$ZOOBIN"`
 
 . $ZOOBINDIR/zkEnv.sh

+ 7 - 1
bin/zkServer.sh

@@ -42,7 +42,13 @@ else
     ZOOMAIN="org.apache.zookeeper.server.quorum.QuorumPeerMain"
 fi
 
-ZOOBIN=`readlink -f "$0"`
+# Only follow symlinks if readlink supports it
+if readlink -f "$0" > /dev/null 2>&1
+then
+  ZOOBIN=`readlink -f "$0"`
+else
+  ZOOBIN="$0"
+fi
 ZOOBINDIR=`dirname "$ZOOBIN"`
 
 . $ZOOBINDIR/zkEnv.sh