lantiq: Fix initscript issue
authorJohn Crispin <john@openwrt.org>
Sun, 18 Jan 2015 09:40:47 +0000 (09:40 +0000)
committerJohn Crispin <john@openwrt.org>
Sun, 18 Jan 2015 09:40:47 +0000 (09:40 +0000)
Currently this initscript fails if the macaddr has any leading zeroes.
This patch corrects the problem.

Signed-off-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
SVN-Revision: 44029

target/linux/lantiq/base-files/etc/init.d/esi

index 5635b5361b30b3cc57ffd8d350129f6cf9471d50..ca79070c9ed34163e4c295454904fbf7a98bc883 100755 (executable)
@@ -3,5 +3,5 @@
 
 START=19
 start() {
-       esi $(printf '%X' $((1+0x$(tr -d : </sys/class/net/eth0/address)))) 2>/dev/null || :
+       esi $(printf '%012X' $((1+0x$(tr -d : </sys/class/net/eth0/address)))) 2>/dev/console || :
 }