fix: Lowercase MAC address (#407)
This commit is contained in:
parent
46867564df
commit
2d0f169892
1 changed files with 2 additions and 2 deletions
|
@ -239,11 +239,11 @@ getInfo() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$MAC" ]; then
|
if [ -z "$MAC" ]; then
|
||||||
# Generate MAC address based on hostname
|
# Generate MAC address based on Docker container ID in hostname
|
||||||
MAC=$(echo "$HOST" | md5sum | sed 's/^\(..\)\(..\)\(..\)\(..\)\(..\).*$/02:\1:\2:\3:\4:\5/')
|
MAC=$(echo "$HOST" | md5sum | sed 's/^\(..\)\(..\)\(..\)\(..\)\(..\).*$/02:\1:\2:\3:\4:\5/')
|
||||||
fi
|
fi
|
||||||
|
|
||||||
VM_NET_MAC="${MAC//-/:}"
|
VM_NET_MAC="${MAC,,//-/:}"
|
||||||
|
|
||||||
if [[ ${#VM_NET_MAC} == 12 ]]; then
|
if [[ ${#VM_NET_MAC} == 12 ]]; then
|
||||||
m="$VM_NET_MAC"
|
m="$VM_NET_MAC"
|
||||||
|
|
Loading…
Reference in a new issue