base-files: set mac address in default network config via device sections

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48646
This commit is contained in:
Felix Fietkau 2016-02-07 14:18:43 +00:00
parent 32dea5d2a9
commit f70c8ba198

View File

@ -77,7 +77,13 @@ generate_network() {
set network.$1.type='$type'
set network.$1.ifname='$ifname'
set network.$1.proto='none'
set network.$1.macaddr='$macaddr'
EOF
[ -n "$macaddr" ] && uci -q batch <<-EOF
delete network.$1_dev
set network.$1_dev='device'
set network.$1_dev.name='$ifname'
set network.$1_dev.macaddr='$macaddr'
EOF
case "$protocol" in