Tidying
This commit is contained in:
parent
3c97b8ba83
commit
913c277d65
|
@ -1791,7 +1791,7 @@ function mesh_batman_bridge {
|
|||
echo 'fi' >> $batman_script
|
||||
echo '' >> $batman_script
|
||||
echo 'start() {' >> $batman_script
|
||||
echo ' if [ -z "$IFACE" ] ; then' >> $batman_script
|
||||
echo ' if [ -z "$IFACE" ]; then' >> $batman_script
|
||||
echo ' echo "error: unable to find wifi interface, not enabling batman-adv mesh"' >> $batman_script
|
||||
echo ' return' >> $batman_script
|
||||
echo ' fi' >> $batman_script
|
||||
|
@ -1812,13 +1812,14 @@ function mesh_batman_bridge {
|
|||
echo ' modprobe batman-adv' >> $batman_script
|
||||
echo ' batctl if add $IFACE' >> $batman_script
|
||||
echo ' ifconfig $IFACE up' >> $batman_script
|
||||
echo ' avahi-autoipd -D $IFACE' >> $batman_script
|
||||
echo ' avahi-autoipd -D bat0' >> $batman_script
|
||||
echo ' avahi-autoipd -D $BRIDGE' >> $batman_script
|
||||
echo ' ifconfig bat0 up promisc' >> $batman_script
|
||||
echo '' >> $batman_script
|
||||
echo ' #Use persistent HWAddr' >> $batman_script
|
||||
echo ' ether_new=$(ifconfig eth0 | grep HWaddr | sed -e "s/.*HWaddr //")' >> $batman_script
|
||||
echo ' if [ ! -f /var/lib/mesh-node/bat0 ]' >> $batman_script
|
||||
echo ' then' >> $batman_script
|
||||
echo ' if [ ! -f /var/lib/mesh-node/bat0 ]; then' >> $batman_script
|
||||
echo ' mkdir /var/lib/mesh-node' >> $batman_script
|
||||
echo ' echo "${ether_new}" > /var/lib/mesh-node/bat0' >> $batman_script
|
||||
echo ' else' >> $batman_script
|
||||
|
@ -1862,7 +1863,9 @@ function mesh_batman_bridge {
|
|||
echo ' rmmod batman-adv' >> $batman_script
|
||||
echo ' ifconfig $IFACE mtu 1500' >> $batman_script
|
||||
echo ' ifconfig $IFACE down' >> $batman_script
|
||||
echo ' avahi-autoipd -k $IFACE' >> $batman_script
|
||||
echo ' avahi-autoipd -k bat0' >> $batman_script
|
||||
echo ' avahi-autoipd -k $BRIDGE' >> $batman_script
|
||||
echo ' iwconfig $IFACE mode managed' >> $batman_script
|
||||
echo '' >> $batman_script
|
||||
echo ' systemctl restart network-manager' >> $batman_script
|
||||
|
|
|
@ -102,7 +102,7 @@ function mesh_babel {
|
|||
echo '' >> $babel_script
|
||||
echo 'if [[ $1 == "start" ]]; then' >> $babel_script
|
||||
echo ' # install avahi' >> $babel_script
|
||||
echo ' apt-get -y install avahi-utils avahi-autoipd' >> $babel_script
|
||||
echo ' apt-get -y install avahi-utils avahi-autoipd avahi-daemon avahi-dnsconfd' >> $babel_script
|
||||
echo ' sed -i "s|#host-name=.*|host-name=$(hostname)|g" /etc/avahi/avahi-daemon.conf' >> $babel_script
|
||||
echo ' sed -i "s|host-name=.*|host-name=$(hostname)|g" /etc/avahi/avahi-daemon.conf' >> $babel_script
|
||||
echo ' if [ -f /bin/systemctl ]; then' >> $babel_script
|
||||
|
@ -164,7 +164,7 @@ function mesh_batman {
|
|||
echo '' >> $batman_script
|
||||
echo 'if [[ $1 == "start" ]]; then' >> $batman_script
|
||||
echo ' # install avahi' >> $batman_script
|
||||
echo ' apt-get -y install avahi-utils avahi-autoipd' >> $batman_script
|
||||
echo ' apt-get -y install avahi-utils avahi-autoipd avahi-daemon avahi-dnsconfd' >> $batman_script
|
||||
echo ' sed -i "s|#host-name=.*|host-name=$(hostname)|g" /etc/avahi/avahi-daemon.conf' >> $batman_script
|
||||
echo ' sed -i "s|host-name=.*|host-name=$(hostname)|g" /etc/avahi/avahi-daemon.conf' >> $batman_script
|
||||
echo 'fi' >> $batman_script
|
||||
|
@ -214,13 +214,14 @@ function mesh_batman {
|
|||
echo ' modprobe batman-adv' >> $batman_script
|
||||
echo ' batctl if add $IFACE' >> $batman_script
|
||||
echo ' ifconfig $IFACE up' >> $batman_script
|
||||
echo ' avahi-autoipd -D $IFACE' >> $batman_script
|
||||
echo ' avahi-autoipd -D bat0' >> $batman_script
|
||||
echo ' avahi-autoipd -D $BRIDGE' >> $batman_script
|
||||
echo ' ifconfig bat0 up promisc' >> $batman_script
|
||||
echo '' >> $batman_script
|
||||
echo ' #Use persistent HWAddr' >> $batman_script
|
||||
echo ' ether_new=$(ifconfig eth0 | grep HWaddr | sed -e "s/.*HWaddr //")' >> $batman_script
|
||||
echo ' if [ ! -f /var/lib/mesh-node/bat0 ]' >> $batman_script
|
||||
echo ' then' >> $batman_script
|
||||
echo ' if [ ! -f /var/lib/mesh-node/bat0 ]; then' >> $batman_script
|
||||
echo ' mkdir /var/lib/mesh-node' >> $batman_script
|
||||
echo ' echo "${ether_new}" > /var/lib/mesh-node/bat0' >> $batman_script
|
||||
echo ' else' >> $batman_script
|
||||
|
@ -266,7 +267,9 @@ function mesh_batman {
|
|||
echo ' rmmod batman-adv' >> $batman_script
|
||||
echo ' ifconfig $IFACE mtu 1500' >> $batman_script
|
||||
echo ' ifconfig $IFACE down' >> $batman_script
|
||||
echo ' avahi-autoipd -k $IFACE' >> $batman_script
|
||||
echo ' avahi-autoipd -k bat0' >> $batman_script
|
||||
echo ' avahi-autoipd -k $BRIDGE' >> $batman_script
|
||||
echo ' iwconfig $IFACE mode managed' >> $batman_script
|
||||
echo '' >> $batman_script
|
||||
echo ' iptables -D INPUT -i $IFACE -p udp --dport 5353 -j ACCEPT' >> $batman_script
|
||||
|
|
Loading…
Reference in New Issue