Update bmx devices within daemons
This commit is contained in:
parent
4d21771969
commit
8fd134ed2a
|
@ -198,10 +198,14 @@ function start {
|
||||||
|
|
||||||
modprobe batman-adv
|
modprobe batman-adv
|
||||||
|
|
||||||
# avahi on ipv4
|
# avahi on ipv6
|
||||||
sed -i 's|use-ipv4=.*|use-ipv4=no|g' /etc/avahi/avahi-daemon.conf
|
sed -i 's|use-ipv4=.*|use-ipv4=no|g' /etc/avahi/avahi-daemon.conf
|
||||||
sed -i 's|use-ipv6=.*|use-ipv6=yes|g' /etc/avahi/avahi-daemon.conf
|
sed -i 's|use-ipv6=.*|use-ipv6=yes|g' /etc/avahi/avahi-daemon.conf
|
||||||
|
|
||||||
|
sed -i "s|ExecStart=.*|ExecStart=/usr/sbin/bmx6 dev=${IFACE}|g" /etc/systemd/system/bmx6.service
|
||||||
|
sed -i "s|ExecStart=.*|ExecStart=/usr/sbin/bmx7 dev=${IFACE}|g" /etc/systemd/system/bmx7.service
|
||||||
|
systemctl daemon-reload
|
||||||
|
|
||||||
add_wifi_interface $IFACE $WIFI_SSID ad-hoc $CHANNEL
|
add_wifi_interface $IFACE $WIFI_SSID ad-hoc $CHANNEL
|
||||||
|
|
||||||
# NOTE: Don't connect the secondary wifi device. hostapd will handle that by itself
|
# NOTE: Don't connect the secondary wifi device. hostapd will handle that by itself
|
||||||
|
@ -220,6 +224,10 @@ function start {
|
||||||
ifconfig $EIFACE 0.0.0.0
|
ifconfig $EIFACE 0.0.0.0
|
||||||
ifconfig $EIFACE up promisc
|
ifconfig $EIFACE up promisc
|
||||||
echo $'End of ethernet bridge'
|
echo $'End of ethernet bridge'
|
||||||
|
|
||||||
|
sed -i "s|ExecStart=.*|ExecStart=/usr/sbin/bmx6 dev=${IFACE} dev=${EIFACE}|g" /etc/systemd/system/bmx6.service
|
||||||
|
sed -i "s|ExecStart=.*|ExecStart=/usr/sbin/bmx7 dev=${IFACE} dev=${EIFACE}|g" /etc/systemd/system/bmx7.service
|
||||||
|
systemctl daemon-reload
|
||||||
else
|
else
|
||||||
echo $"$EIFACE is not connected"
|
echo $"$EIFACE is not connected"
|
||||||
fi
|
fi
|
||||||
|
@ -243,8 +251,10 @@ function start {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if grep -q "bmx6" $MESH_DEFAULT_PROTOCOL; then
|
if grep -q "bmx6" $MESH_DEFAULT_PROTOCOL; then
|
||||||
|
systemctl enable bmx6
|
||||||
systemctl restart bmx6
|
systemctl restart bmx6
|
||||||
else
|
else
|
||||||
|
systemctl enable bmx7
|
||||||
systemctl restart bmx7
|
systemctl restart bmx7
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue