sijie closed pull request #1340: Only check ipv6 binding when /sbin/sysctl 
exists
URL: https://github.com/apache/bookkeeper/pull/1340
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/bin/bookkeeper b/bin/bookkeeper
index 6b5bacda9..3ceefe537 100755
--- a/bin/bookkeeper
+++ b/bin/bookkeeper
@@ -18,13 +18,15 @@
 # * limitations under the License.
 # */
 
-# check if net.ipv6.bindv6only is set to 1
-bindv6only=$(/sbin/sysctl -n net.ipv6.bindv6only 2> /dev/null)
-if [ -n "$bindv6only" ] && [ "$bindv6only" -eq "1" ]
-then
-  echo "Error: \"net.ipv6.bindv6only\" is set to 1 - Java networking could be 
broken"
-  echo "For more info (the following page also applies to bookkeeper): 
http://wiki.apache.org/hadoop/HadoopIPv6";
-  exit 1
+if [ -f /sbin/sysctl ]; then
+  # check if net.ipv6.bindv6only is set to 1
+  bindv6only=$(/sbin/sysctl -n net.ipv6.bindv6only 2> /dev/null)
+  if [ -n "$bindv6only" ] && [ "$bindv6only" -eq "1" ]
+  then
+    echo "Error: \"net.ipv6.bindv6only\" is set to 1 - Java networking could 
be broken"
+    echo "For more info (the following page also applies to bookkeeper): 
http://wiki.apache.org/hadoop/HadoopIPv6";
+    exit 1
+  fi
 fi
 
 # See the following page for extensive details on setting


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to