Changeset 5c80a16 in clfs-embedded for bootscripts/clfs
- Timestamp:
- Sep 13, 2009, 4:54:46 AM (15 years ago)
- Branches:
- master
- Children:
- baaf929
- Parents:
- 884672b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
bootscripts/clfs/rc.d/init.d/bcm47xx-switch
r884672b r5c80a16 27 27 case "$1" in 28 28 start) 29 n=0 29 30 # Add a specific workaround for the case of weirdly set wireless mac address 31 # Do what openwrt is doing, and increment the last hex with 2 32 if [ "`nvram get il0macaddr`" = 00:90:4c:5f:00:2a ]; then 33 et0="$(nvram get et0macaddr)" 34 prefix="$(echo $et0 | sed -e 's/:..$//')" 35 addendum=$(( (0x$(echo $et0 | sed -e s/.*://g) + 2) % 256 )) 36 il0=$(printf %s:%02x $prefix $addendum) 37 echo -n "Fixing up wlan0 mac address: " 38 nvram set il0macaddr=$il0 && nvram commit 39 check_status 40 ifconfig wlan0 hw ether $il0 2>/dev/null 41 fi 30 42 31 43 # eth0 has to be up for this
Note:
See TracChangeset
for help on using the changeset viewer.