openwrtv4/package/base-files/files
Gabor Juhos b7914344ad base-files: add macaddr_canonicalize helper function
In commit r38690, the MAC address canonicalization
has been converted to use 'tr' instead of 'printf'.
This only works if with MAC addresses which uses
the 'xx:xx:xx:xx:xx:xx' format.

However on some boards, the MAC addresses are stored
in different format in the mtd partition. Some vendors
are using hyphens or dots as separators instead of
colons. Also the leading zeroes may be missing from the
individual octets or those are replaced with spaces.

Add a new function which can be used to convert these
into the 'xx:xx:xx:xx:xx:xx' format. Also update the
'mtd_get_mac_ascii' function to use the new helper.

The helper function is based on this code:
  http://isquared.nl/blog/2010/08/11/Bash-function-to-canonicalize-MAC-addresses/

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 38803
2013-11-14 17:44:42 +00:00
..
bin base-files: ipcalc.sh: fix broken calculations on 64bit systems 2012-12-23 22:18:43 +00:00
etc base-files: don't enter failsafe if triggered by switch 2013-11-11 23:34:11 +00:00
lib base-files: add macaddr_canonicalize helper function 2013-11-14 17:44:42 +00:00
rom rename default/ to files/ 2006-11-22 23:30:57 +00:00
sbin base-files: implement -l (--list-backup) sysupgrade parameter to list the files that would be backed up 2013-07-31 18:11:55 +00:00