Unverified Commit 2d0f1698 authored by Kroese's avatar Kroese Committed by GitHub
Browse files

fix: Lowercase MAC address (#407)

parent 46867564
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -239,11 +239,11 @@ getInfo() {
  fi

  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/')
  fi

  VM_NET_MAC="${MAC//-/:}"
  VM_NET_MAC="${MAC,,//-/:}"

  if [[ ${#VM_NET_MAC} == 12 ]]; then
    m="$VM_NET_MAC"