[ARVADOS] updated: d39be4ad92ae92f72367d633f92208f8487ba1b2

git at public.curoverse.com git at public.curoverse.com
Fri May 15 16:36:08 EDT 2015


Summary of changes:
 docker/arvdock | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

       via  d39be4ad92ae92f72367d633f92208f8487ba1b2 (commit)
      from  37fe7a30a22b669818a185df137c34da09022af3 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit d39be4ad92ae92f72367d633f92208f8487ba1b2
Author: Nico Cesar <nico at nicocesar.com>
Date:   Fri May 15 15:00:21 2015 -0400

    $start_bridge -> $bridge
    
    options modified
    
    ip command refactored
    
    refs #5998

diff --git a/docker/arvdock b/docker/arvdock
index 36baf8a..b6477d6 100755
--- a/docker/arvdock
+++ b/docker/arvdock
@@ -47,12 +47,12 @@ function ip_address {
 function bridge_ip_address {
     local bridge_name=$1
     # FIXME: add a more robust check here.
-    # because ip command could be mising, multiple docker birdges could be there.. etc.
-    echo $(ip -oneline addr show  | grep $bridge_name | grep -E '\binet\b' | awk '{ print $4 }'| cut -d/ -f1 )
+    # because ip command could be mising, multiple docker bridges could be there.. etc.
+    echo $(ip --oneline --family inet addr show dev "$bridge_name" | awk '{ print $4 }'| cut -d/ -f1 )
 }
 
 function start_container {
-    bridge_ip=$(bridge_ip_address "$start_bridge")
+    bridge_ip=$(bridge_ip_address "$bridge")
 
     local args="-d -i -t"
     if [[ "$1" != '' ]]; then
@@ -126,12 +126,12 @@ function do_start {
     local start_nameserver=false
     local start_keep=false
     local start_keepproxy=false
-    local start_bridge="docker0"
+    local bridge="docker0"
     local
 
     # NOTE: This requires GNU getopt (part of the util-linux package on Debian-based distros).
-    local TEMP=`getopt -o d::s::a::cw::nkpvh \
-                  --long doc::,sso::,api::,bridge::,compute,workbench::,nameserver,keep,keepproxy,vm,help \
+    local TEMP=`getopt -o d::s::b:a::cw::nkpvh \
+                  --long doc::,sso::,api::,bridge:,compute,workbench::,nameserver,keep,keepproxy,vm,help \
                   -n "$0" -- "$@"`
 
     if [ $? != 0 ] ; then echo "Use -h for help"; exit 1 ; fi
@@ -144,7 +144,6 @@ function do_start {
         case $1 in
             -b | --bridge)
                 case "$2" in
-                    "") start_bridge="docker0"; shift 2 ;;
                     *)  start_bridge=$2; shift 2 ;;
                 esac
                 ;;
@@ -214,7 +213,6 @@ function do_start {
           $start_keep == false &&
           $start_keepproxy == false ]]
     then
-        start_bridge="docker0"
         start_doc=9898
         #the sso server is currently not used by default so don't start it unless explicitly requested
         #start_sso=9901
@@ -233,8 +231,8 @@ function do_start {
       # so make sure they are running
       $DOCKER ps | grep skydns >/dev/null
       if [[ "$?" != "0" ]]; then
-        echo "Detecting bridge '$start_bridge' IP for crosbymichael/skydns"
-        bridge_ip=$(bridge_ip_address "$start_bridge")
+        echo "Detecting bridge '$bridge' IP for crosbymichael/skydns"
+        bridge_ip=$(bridge_ip_address "$bridge")
 
         echo "Starting crosbymichael/skydns container..."
         $DOCKER rm "skydns" 2>/dev/null

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list