We're taking the Mulder approach, Trust No-one. ms5sum and sed may not be
as they seem...
# 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" \