projects
/
openwrt
/
svn-archive
/
openwrt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
32dea5d
)
base-files: set mac address in default network config via device sections
author
Felix Fietkau
<nbd@openwrt.org>
Sun, 7 Feb 2016 14:18:43 +0000
(14:18 +0000)
committer
Felix Fietkau
<nbd@openwrt.org>
Sun, 7 Feb 2016 14:18:43 +0000
(14:18 +0000)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 48646
package/base-files/files/bin/config_generate
patch
|
blob
|
history
diff --git
a/package/base-files/files/bin/config_generate
b/package/base-files/files/bin/config_generate
index 9218788b5e8f24483b3262bd2d23c3cc43a64b9f..92eb14bb1117d7801392e9d37a3ac0e6091886d3 100755
(executable)
--- a/
package/base-files/files/bin/config_generate
+++ b/
package/base-files/files/bin/config_generate
@@
-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