fix: Remove non-printable characters (#949)
Some checks failed
Build / Check (push) Has been cancelled
Build / Build (push) Has been cancelled

This commit is contained in:
Kroese
2025-03-24 13:52:38 +01:00
committed by GitHub
parent ad26129375
commit 0c7acd6e71
3 changed files with 6 additions and 3 deletions

View File

@@ -399,6 +399,7 @@ getInfo() {
if [ -z "$VM_NET_MAC" ]; then
local file="$STORAGE/dsm.mac"
[ -s "$file" ] && VM_NET_MAC=$(<"$file")
VM_NET_MAC="${VM_NET_MAC//[![:print:]]/}"
if [ -z "$VM_NET_MAC" ]; then
# Generate MAC address based on Docker container ID in hostname
VM_NET_MAC=$(echo "$HOST" | md5sum | sed 's/^\(..\)\(..\)\(..\)\(..\)\(..\).*$/02:11:32:\3:\4:\5/')