Add traceroute for mesh testing
This commit is contained in:
parent
73b18fcf9e
commit
6dbcf2ab2f
|
@ -844,9 +844,21 @@ initialise_mesh() {
|
||||||
# dhcp daemon for hotspot on secondary wifi adapter
|
# dhcp daemon for hotspot on secondary wifi adapter
|
||||||
chroot "$rootdir" apt-get -yq install dnsmasq
|
chroot "$rootdir" apt-get -yq install dnsmasq
|
||||||
|
|
||||||
|
# for debugging
|
||||||
|
chroot "$rootdir" apt-get -yq install traceroute
|
||||||
|
|
||||||
# set the default protocol to be used
|
# set the default protocol to be used
|
||||||
echo 'batman-adv' > $rootdir$MESH_DEFAULT_PROTOCOL
|
echo 'batman-adv' > $rootdir$MESH_DEFAULT_PROTOCOL
|
||||||
|
|
||||||
|
sed -i 's|#net.ipv6.conf.all.forwarding.*|net.ipv6.conf.all.forwarding=1|g' $rootdir/etc/sysctl.conf
|
||||||
|
sed -i 's|net.ipv6.conf.all.forwarding.*|net.ipv6.conf.all.forwarding=1|g' $rootdir/etc/sysctl.conf
|
||||||
|
|
||||||
|
sed -i 's|#net.ipv6.conf.all.accept_redirects.*|net.ipv6.conf.all.accept_redirects=1|g' $rootdir/etc/sysctl.conf
|
||||||
|
sed -i 's|net.ipv6.conf.all.accept_redirects.*|net.ipv6.conf.all.accept_redirects=1|g' $rootdir/etc/sysctl.conf
|
||||||
|
|
||||||
|
sed -i 's|#net.ipv6.conf.all.accept_source_route.*|net.ipv6.conf.all.accept_source_route=1|g' $rootdir/etc/sysctl.conf
|
||||||
|
sed -i 's|net.ipv6.conf.all.accept_source_route.*|net.ipv6.conf.all.accept_source_route=1|g' $rootdir/etc/sysctl.conf
|
||||||
|
|
||||||
configure_firewall
|
configure_firewall
|
||||||
install_avahi
|
install_avahi
|
||||||
install_batman
|
install_batman
|
||||||
|
|
|
@ -180,11 +180,14 @@ function start {
|
||||||
# avahi on ipv6
|
# 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|#disallow-other-stacks=.*|disallow-other-stacks=no|g' /etc/avahi/avahi-daemon.conf
|
||||||
|
sed -i 's|disallow-other-stacks=.*|disallow-other-stacks=no|g' /etc/avahi/avahi-daemon.conf
|
||||||
|
sed -i 's|#publish-a-on-ipv6=.*|publish-a-on-ipv6=yes|g' /etc/avahi/avahi-daemon.conf
|
||||||
|
sed -i 's|publish-a-on-ipv6=.*|publish-a-on-ipv6=yes|g' /etc/avahi/avahi-daemon.conf
|
||||||
systemctl restart avahi-daemon
|
systemctl restart avahi-daemon
|
||||||
|
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
systemctl enable bmx6
|
systemctl enable bmx6
|
||||||
systemctl start bmx6
|
|
||||||
|
|
||||||
# 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
|
||||||
|
|
||||||
|
@ -213,6 +216,7 @@ function start {
|
||||||
sed -i "s|server_name .*|server_name ${HOSTNAME}.local;|g" /etc/nginx/sites-available/git_ssb
|
sed -i "s|server_name .*|server_name ${HOSTNAME}.local;|g" /etc/nginx/sites-available/git_ssb
|
||||||
|
|
||||||
systemctl restart nginx
|
systemctl restart nginx
|
||||||
|
systemctl restart bmx6
|
||||||
|
|
||||||
verify
|
verify
|
||||||
|
|
||||||
|
@ -296,7 +300,7 @@ case "$1" in
|
||||||
start
|
start
|
||||||
;;
|
;;
|
||||||
ping)
|
ping)
|
||||||
ping -v -6 $2
|
ping6 -v $2
|
||||||
;;
|
;;
|
||||||
data)
|
data)
|
||||||
bmx6 -lc traffic=$IFACE
|
bmx6 -lc traffic=$IFACE
|
||||||
|
|
|
@ -178,11 +178,14 @@ function start {
|
||||||
# avahi on ipv6
|
# 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|#disallow-other-stacks=.*|disallow-other-stacks=no|g' /etc/avahi/avahi-daemon.conf
|
||||||
|
sed -i 's|disallow-other-stacks=.*|disallow-other-stacks=no|g' /etc/avahi/avahi-daemon.conf
|
||||||
|
sed -i 's|#publish-a-on-ipv6=.*|publish-a-on-ipv6=yes|g' /etc/avahi/avahi-daemon.conf
|
||||||
|
sed -i 's|publish-a-on-ipv6=.*|publish-a-on-ipv6=yes|g' /etc/avahi/avahi-daemon.conf
|
||||||
systemctl restart avahi-daemon
|
systemctl restart avahi-daemon
|
||||||
|
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
systemctl enable bmx7
|
systemctl enable bmx7
|
||||||
systemctl start bmx7
|
|
||||||
|
|
||||||
# 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
|
||||||
|
|
||||||
|
@ -211,6 +214,7 @@ function start {
|
||||||
sed -i "s|server_name .*|server_name ${HOSTNAME}.local;|g" /etc/nginx/sites-available/git_ssb
|
sed -i "s|server_name .*|server_name ${HOSTNAME}.local;|g" /etc/nginx/sites-available/git_ssb
|
||||||
|
|
||||||
systemctl restart nginx
|
systemctl restart nginx
|
||||||
|
systemctl restart bmx7
|
||||||
|
|
||||||
verify
|
verify
|
||||||
|
|
||||||
|
@ -294,7 +298,7 @@ case "$1" in
|
||||||
start
|
start
|
||||||
;;
|
;;
|
||||||
ping)
|
ping)
|
||||||
ping -v -6 $2
|
ping6 -v $2
|
||||||
;;
|
;;
|
||||||
data)
|
data)
|
||||||
bmx7 -lc traffic=$IFACE
|
bmx7 -lc traffic=$IFACE
|
||||||
|
|
Loading…
Reference in New Issue