Use netplan mac setting only with systemd-networkd
This commit is contained in:
parent
b41d055e96
commit
7b33243c27
@ -37,6 +37,12 @@ generate_random_mac ()
|
||||
# Set a fixed random MAC for each Ethernet interface
|
||||
set_fixed_mac ()
|
||||
{
|
||||
|
||||
# we use random mac routine only with sytemd-network.
|
||||
if ! grep 'renderer: networkd' /etc/netplan/*.yaml >/dev/null; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
local netplan_config_file="/etc/netplan/20-eth-fixed-mac.yaml"
|
||||
|
||||
# Initialize a new Netplan config file
|
||||
|
||||
Loading…
Reference in New Issue
Block a user