fix: Convert dashes in custom MAC addresses (#626)

This commit is contained in:
Kroese 2024-02-08 17:03:30 +01:00 committed by GitHub
parent f412580a4a
commit f24ba41930
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View File

@ -216,7 +216,8 @@ getInfo() {
VM_NET_MAC=$(echo "$HOST" | md5sum | sed 's/^\(..\)\(..\)\(..\)\(..\)\(..\).*$/02:11:32:\3:\4:\5/') VM_NET_MAC=$(echo "$HOST" | md5sum | sed 's/^\(..\)\(..\)\(..\)\(..\)\(..\).*$/02:11:32:\3:\4:\5/')
fi fi
VM_NET_MAC="${VM_NET_MAC,,//-/:}" VM_NET_MAC="${VM_NET_MAC,,}"
VM_NET_MAC="${VM_NET_MAC//-/:}"
if [[ ${#VM_NET_MAC} == 12 ]]; then if [[ ${#VM_NET_MAC} == 12 ]]; then
m="$VM_NET_MAC" m="$VM_NET_MAC"

View File

@ -166,9 +166,12 @@ _graceful_shutdown() {
finish "$code" && return "$code" finish "$code" && return "$code"
} }
PROCESS="${APP,,}"
PROCESS="${PROCESS// /-}"
MON_OPTS="\ MON_OPTS="\
-pidfile $QEMU_PID \ -pidfile $QEMU_PID \
-name ${APP,,// /-},process=${APP,,// /-},debug-threads=on \ -name $PROCESS,process=$PROCESS,debug-threads=on \
-monitor telnet:localhost:$QEMU_PORT,server,nowait,nodelay" -monitor telnet:localhost:$QEMU_PORT,server,nowait,nodelay"
if [[ "$CONSOLE" != [Yy]* ]]; then if [[ "$CONSOLE" != [Yy]* ]]; then