summaryrefslogtreecommitdiffstats
path: root/rc.wireless
diff options
context:
space:
mode:
authorJakub Jankowski <shasta@toxcorp.com>2018-01-08 03:37:13 +0100
committerRobby Workman <rworkman@slackware.com>2018-05-24 01:23:40 -0500
commit2e90f05b5634c51776bb7014aeef1f903d9a4122 (patch)
tree18fd4eaf909c6215f1f2882a1e600a3de83e86d2 /rc.wireless
parent63fcb919b0cdefae3ae7cd7f933c70169c454710 (diff)
downloadslacknetsetup-2e90f05b5634c51776bb7014aeef1f903d9a4122.tar.xz
Take HWADDR from sysfs
Instead of "ip | sed", just read the sysfs file in which hardware address is readily presented for us. Signed-off-by: Jakub Jankowski <shasta@toxcorp.com>
Diffstat (limited to 'rc.wireless')
-rw-r--r--rc.wireless2
1 files changed, 1 insertions, 1 deletions
diff --git a/rc.wireless b/rc.wireless
index d742ae1..0aac434 100644
--- a/rc.wireless
+++ b/rc.wireless
@@ -124,7 +124,7 @@ $IFCOMMAND up
sleep 3
# Get the MAC address for the interface
-HWADDR=$(/sbin/ip link show dev ${INTERFACE} | sed -ne 's/.*link\/ether \(..:..:..:..:..:..\).*/\U\1/p')
+HWADDR=$(cat "/sys/class/net/${INTERFACE}/address")
# Empty all wireless parameters- some of them could still be set for a previous interface:
# when rc.inet1 is sourced from rc.M all scripts are run in the same shell.