Skip to content

Commit

Permalink
fix: Convert dashes in custom MAC addresses (#626)
Browse files Browse the repository at this point in the history
  • Loading branch information
kroese authored Feb 8, 2024
1 parent f412580 commit f24ba41
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/network.sh
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,8 @@ getInfo() {
VM_NET_MAC=$(echo "$HOST" | md5sum | sed 's/^\(..\)\(..\)\(..\)\(..\)\(..\).*$/02:11:32:\3:\4:\5/')
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
m="$VM_NET_MAC"
Expand Down
5 changes: 4 additions & 1 deletion src/power.sh
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,12 @@ _graceful_shutdown() {
finish "$code" && return "$code"
}

PROCESS="${APP,,}"
PROCESS="${PROCESS// /-}"

MON_OPTS="\
-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"

if [[ "$CONSOLE" != [Yy]* ]]; then
Expand Down

0 comments on commit f24ba41

Please sign in to comment.