Ignore:
Timestamp:
2011-08-15T21:00:23+02:00 (5 years ago)
Author:
juhosg
Message:

ramips: use maccalc instead of hexdump + sed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/ramips/base-files/etc/uci-defaults/nw718

    r28006 r28007  
    99        local wan_mac 
    1010 
     11        [ -z $(which maccalc) ] && return 
     12 
    1113        . /etc/functions.sh 
    1214 
     
    1416        [ -z $part ] && return 
    1517 
    16         lan_mac=$(dd bs=1 skip=4 count=6 if=$part 2>/dev/null | hexdump -v -e '1/1 "%02x"' | sed 's/\(..\)/\1:/g;s/:$//') 
     18        lan_mac=$(dd bs=1 skip=4 count=6 if=$part 2>/dev/null | maccalc bin2mac) 
    1719        [ -z $lan_mac ] && return 
    1820 
    19         [ -z $(which maccalc) ] && return 
    2021        wan_mac=$(maccalc add $lan_mac 1) 
    2122 
Note: See TracChangeset for help on using the changeset viewer.