From dd68dfdffb676285d191c24b680134093954a023 Mon Sep 17 00:00:00 2001 From: Matt Palmer Date: Thu, 21 Apr 2016 11:22:57 +1000 Subject: [PATCH] Run MAC address generation within a known environment We're taking the Mulder approach, Trust No-one. ms5sum and sed may not be as they seem... --- launcher | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/launcher b/launcher index 0a77911..c2ee244 100755 --- a/launcher +++ b/launcher @@ -528,7 +528,7 @@ run_start(){ # docker added more hostname rules hostname=${hostname/_/-} - mac_address="--mac-address $(echo $hostname | md5sum | sed 's/^\(..\)\(..\)\(..\)\(..\)\(..\).*$/02:\1:\2:\3:\4:\5/')" + mac_address="--mac-address $(echo $hostname | $docker_path run $user_args -i --rm -a stdout -a stderr $image /bin/sh -c "md5sum | sed 's/^\(..\)\(..\)\(..\)\(..\)\(..\).*$/02:\1:\2:\3:\4:\5/'")" set -x $docker_path run $user_args $links $attach_on_run $restart_policy "${env[@]}" -h "$hostname" \ -- 2.25.1