echo "Options:"
echo " --skip-prereqs Don't check launcher prerequisites"
echo " --docker-args Extra arguments to pass when running docker"
+ echo " --skip-mac-address Don't assign a mac address"
exit 1
}
--skip-prereqs)
SKIP_PREREQS="1"
;;
+ --skip-mac-address)
+ SKIP_MAC_ADDRESS="1"
+ ;;
--docker-args)
user_args="$2"
shift
# docker added more hostname rules
hostname=${hostname//_/-}
- mac_address="--mac-address $($docker_path run $user_args -i --rm -a stdout -a stderr $image /bin/sh -c "echo $hostname | md5sum | sed 's/^\(..\)\(..\)\(..\)\(..\)\(..\).*$/02:\1:\2:\3:\4:\5/'")"
+
+ if [ -z "$SKIP_MAC_ADDRESS" ] ; then
+ mac_address="--mac-address $($docker_path run $user_args -i --rm -a stdout -a stderr $image /bin/sh -c "echo $hostname | md5sum | sed 's/^\(..\)\(..\)\(..\)\(..\)\(..\).*$/02:\1:\2:\3:\4:\5/'")"
+ fi
set -x
$docker_path run $user_args $links $attach_on_run $restart_policy "${env[@]}" -h "$hostname" \