mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-11-11 20:43:42 +08:00
fix: Remove non-printable characters (#949)
This commit is contained in:
@@ -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/')
|
||||
|
||||
Reference in New Issue
Block a user