You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
echo" --docker-args Extra arguments to pass when running docker"
19
+
echo" --skip-mac-address Don't assign a mac address"
19
20
exit 1
20
21
}
21
22
@@ -31,6 +32,9 @@ while [ ${#} -gt 0 ]; do
31
32
--skip-prereqs)
32
33
SKIP_PREREQS="1"
33
34
;;
35
+
--skip-mac-address)
36
+
SKIP_MAC_ADDRESS="1"
37
+
;;
34
38
--docker-args)
35
39
user_args="$2"
36
40
shift
@@ -448,7 +452,10 @@ run_start() {
448
452
# docker added more hostname rules
449
453
hostname=${hostname//_/-}
450
454
451
-
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/'")"
455
+
456
+
if [ -z"$SKIP_MAC_ADDRESS" ] ;then
457
+
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/'")"
458
+
fi
452
459
453
460
set -x
454
461
$docker_path run $user_args$links$attach_on_run$restart_policy"${env[@]}" -h "$hostname" \
0 commit comments