summaryrefslogtreecommitdiff
path: root/package/base-files
diff options
context:
space:
mode:
Diffstat (limited to 'package/base-files')
-rwxr-xr-xpackage/base-files/files/lib/network/config.sh1
-rwxr-xr-xpackage/base-files/files/sbin/wifi2
2 files changed, 2 insertions, 1 deletions
diff --git a/package/base-files/files/lib/network/config.sh b/package/base-files/files/lib/network/config.sh
index 9b43205..29b7fe5 100755
--- a/package/base-files/files/lib/network/config.sh
+++ b/package/base-files/files/lib/network/config.sh
@@ -231,6 +231,7 @@ setup_interface() {
# Interface settings
config_get mtu "$config" mtu
config_get macaddr "$config" macaddr
+ macaddr="${macaddr:-$3}"
grep "$iface:" /proc/net/dev > /dev/null && \
$DEBUG ifconfig "$iface" down && \
$DEBUG ifconfig "$iface" ${macaddr:+hw ether "$macaddr"} ${mtu:+mtu $mtu} up
diff --git a/package/base-files/files/sbin/wifi b/package/base-files/files/sbin/wifi
index e9752c6..30ecb1b 100755
--- a/package/base-files/files/sbin/wifi
+++ b/package/base-files/files/sbin/wifi
@@ -70,7 +70,7 @@ start_net() {(
[ -f "/var/run/$iface.pid" ] && kill "$(cat /var/run/${iface}.pid)" 2>/dev/null
include /lib/network
scan_interfaces
- setup_interface "$1" "$2"
+ setup_interface "$1" "$2" "$3"
)}
set_wifi_up() {