mirror of
https://github.com/oSoWoSo/DistroHopper.git
synced 2024-08-14 22:46:53 +00:00
Allow persist MAC addresses for bridged interfaces. Fixes #287
This commit is contained in:
parent
8bb24f69c0
commit
2e15b1219f
3 changed files with 30 additions and 4 deletions
10
quickemu
10
quickemu
|
@ -1008,8 +1008,15 @@ function vm_boot() {
|
|||
elif [ -n "${network}" ]; then
|
||||
# Enable bridge mode networking
|
||||
echo " - Network: Bridged (${network})"
|
||||
|
||||
# If a persistent MAC address is provided, use it.
|
||||
local MAC=""
|
||||
if [ -n "${macaddr}" ]; then
|
||||
MAC=",mac=${macaddr}"
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC2054,SC2206
|
||||
args+=(-nic bridge,br=${network},model=virtio-net-pci)
|
||||
args+=(-nic bridge,br=${network},model=virtio-net-pci${MAC})
|
||||
else
|
||||
echo " - Network: User (${NET_DEVICE})"
|
||||
# shellcheck disable=SC2054,SC2206
|
||||
|
@ -1418,6 +1425,7 @@ floppy=""
|
|||
guest_os="linux"
|
||||
img=""
|
||||
iso=""
|
||||
macaddr=""
|
||||
macos_release=""
|
||||
network=""
|
||||
port_forwards=()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue