summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoregon_ffj <egon@freifunk-jena.de>2011-06-25 09:56:39 (GMT)
committeregon_ffj <egon@freifunk-jena.de>2011-06-25 09:56:39 (GMT)
commit621d12b6d0144a344d4ba80eadc35c9cfe856d92 (patch)
treeb2d4e8ec797f3bd2d03b12c26c5a81cd14b1f6c8
parent3b3b49e18f72ea2dd5855f8ed7f89480562b4954 (diff)
* do not use the complete ath0 mac, only the last 4 bytes with 2 prefix-bytes "12:34"
-rwxr-xr-xfiles/etc/init.d/n2n4
1 files changed, 2 insertions, 2 deletions
diff --git a/files/etc/init.d/n2n b/files/etc/init.d/n2n
index ae44b8b..22d7a36 100755
--- a/files/etc/init.d/n2n
+++ b/files/etc/init.d/n2n
@@ -16,10 +16,10 @@ config_cb() {
config_get key "$cfg" key
config_get_bool route "$cfg" route 0
config_get devname "$cfg" devname
- node_mac=`ifconfig ath0 | grep HWaddr | awk '{print $5}' | tr -d "\n"`
+ node_mac=`ifconfig ath0 | grep HWaddr | awk '{print $5}' | tr -d "\n" | cut -c6-`
[ "$route" = "1" ] && args='-r'
if [ "$ipaddr" != "" ]; then
- edge -f $args -a 169.254.0.1 -d $devname -c $community -k $key -m ${node_mac} -l ${supernode}:${port}
+ edge -f $args -a 169.254.0.1 -d $devname -c $community -k $key -m 12:34${node_mac} -l ${supernode}:${port}
ifconfig $devname 0.0.0.0
batctl if add $devname
fi
contact: Jan Huwald // Impressum