From 6bcc87535597864260dbda0031db348126744548 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Wed, 19 May 2021 19:37:36 +0200 Subject: [PATCH] Fix on macvlan --- macvlan/files/etc/init.d/macvlan | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/macvlan/files/etc/init.d/macvlan b/macvlan/files/etc/init.d/macvlan index 01a6ee47c..2832e5133 100755 --- a/macvlan/files/etc/init.d/macvlan +++ b/macvlan/files/etc/init.d/macvlan @@ -66,7 +66,7 @@ _setup_interface() { uci -q set network.$1_dev.mtu=$(uci -q get network.$1.mtu) [ -z "$(uci -q get network.$1.masterintf)" ] && uci -q set network.$1.masterintf=$(uci -q get network.$1_dev.ifname) [ -n "$(uci -q get network.$1.masterintf)" ] && uci -q set network.$1_dev.ifname=$(uci -q get network.$1.masterintf) - [ -z "$(uci -q get network.$1.macaddr)" ] && uci -q set network.$1_dev.macaddr=$(uci -q get network.$1.macaddr) + [ -n "$(uci -q get network.$1.macaddr)" ] && uci -q set network.$1_dev.macaddr=$(uci -q get network.$1.macaddr) uci set network.$1.ifname=$1 uci -q commit network return 0 @@ -83,7 +83,7 @@ _setup_interface() { set network.$1.defaultroute=0 EOF - _macaddr=$(uci -q get "network.$1.macaddr") + #_macaddr=$(uci -q get "network.$1.macaddr") _setup_macaddr "$1" "${_macaddr:-auto$(date +%s)}" uci -q set network.$1_dev.mtu=$(uci -q get network.$1.mtu) uci -q commit network