network-manage all the things

This commit is contained in:
Bob Mottram 2015-08-08 10:06:43 +01:00
parent d80ef70c67
commit 72878e6511
2 changed files with 9 additions and 9 deletions

View File

@ -1482,7 +1482,7 @@ function mesh_cjdns {
echo ' pre-up modprobe ipv6' >> /etc/network/interfaces echo ' pre-up modprobe ipv6' >> /etc/network/interfaces
echo ' address fdfc:0000:0000:0000:0000:0000:0000:0001' >> /etc/network/interfaces echo ' address fdfc:0000:0000:0000:0000:0000:0000:0001' >> /etc/network/interfaces
echo ' netmask 64' >> /etc/network/interfaces echo ' netmask 64' >> /etc/network/interfaces
service networking restart service network-manager restart
if [ ! "$?" = "0" ]; then if [ ! "$?" = "0" ]; then
systemctl status networking.service systemctl status networking.service
exit 6949 exit 6949
@ -1679,11 +1679,11 @@ function mesh_babel {
echo 'if [[ ! $IFACE_EXISTS || $1 == "stop" ]]; then' >> $babel_script echo 'if [[ ! $IFACE_EXISTS || $1 == "stop" ]]; then' >> $babel_script
echo ' echo "Interface $IFACE was not found"' >> $babel_script echo ' echo "Interface $IFACE was not found"' >> $babel_script
echo ' ifconfig $IFACE down' >> $babel_script echo ' ifconfig $IFACE down' >> $babel_script
echo ' systemctl restart networking' >> $babel_script echo ' systemctl restart network-manager' >> $babel_script
echo ' exit 1' >> $babel_script echo ' exit 1' >> $babel_script
echo 'fi' >> $babel_script echo 'fi' >> $babel_script
echo '' >> $babel_script echo '' >> $babel_script
echo 'systemctl stop networking' >> $babel_script echo 'systemctl stop network-manager' >> $babel_script
echo 'ifconfig $IFACE down' >> $babel_script echo 'ifconfig $IFACE down' >> $babel_script
echo -n 'iwconfig $IFACE mode ad-hoc channel ' >> $babel_script echo -n 'iwconfig $IFACE mode ad-hoc channel ' >> $babel_script
echo "$WIFI_CHANNEL essid \"$ESSID\"" >> $babel_script echo "$WIFI_CHANNEL essid \"$ESSID\"" >> $babel_script
@ -1765,7 +1765,7 @@ function mesh_batman_bridge {
echo ' return' >> $batman_script echo ' return' >> $batman_script
echo ' fi' >> $batman_script echo ' fi' >> $batman_script
echo ' echo "info: enabling batman-adv mesh network $ESSID on $IFACE"' >> $batman_script echo ' echo "info: enabling batman-adv mesh network $ESSID on $IFACE"' >> $batman_script
echo ' systemctl stop networking' >> $batman_script echo ' systemctl stop network-manager' >> $batman_script
echo ' sleep 5' >> $batman_script echo ' sleep 5' >> $batman_script
echo '' >> $batman_script echo '' >> $batman_script
echo ' # Might have to re-enable wifi' >> $batman_script echo ' # Might have to re-enable wifi' >> $batman_script
@ -1824,7 +1824,7 @@ function mesh_batman_bridge {
echo ' ifconfig $IFACE down' >> $batman_script echo ' ifconfig $IFACE down' >> $batman_script
echo ' iwconfig $IFACE mode managed' >> $batman_script echo ' iwconfig $IFACE mode managed' >> $batman_script
echo '' >> $batman_script echo '' >> $batman_script
echo ' systemctl restart networking' >> $batman_script echo ' systemctl restart network-manager' >> $batman_script
echo '}' >> $batman_script echo '}' >> $batman_script
echo '' >> $batman_script echo '' >> $batman_script
echo 'if [ ! $IFACE_EXISTS ]; then' >> $batman_script echo 'if [ ! $IFACE_EXISTS ]; then' >> $batman_script

View File

@ -126,7 +126,7 @@ function mesh_babel {
echo ' ifconfig $IFACE down' >> $babel_script echo ' ifconfig $IFACE down' >> $babel_script
echo ' pkill babeld' >> $babel_script echo ' pkill babeld' >> $babel_script
echo ' if [ -f /bin/systemctl ]; then' >> $babel_script echo ' if [ -f /bin/systemctl ]; then' >> $babel_script
echo ' systemctl restart networking' >> $babel_script echo ' systemctl restart network-manager' >> $babel_script
echo ' else' >> $babel_script echo ' else' >> $babel_script
echo ' service network-manager restart' >> $babel_script echo ' service network-manager restart' >> $babel_script
echo ' fi' >> $babel_script echo ' fi' >> $babel_script
@ -134,7 +134,7 @@ function mesh_babel {
echo 'fi' >> $babel_script echo 'fi' >> $babel_script
echo '' >> $babel_script echo '' >> $babel_script
echo 'if [ -f /bin/systemctl ]; then' >> $babel_script echo 'if [ -f /bin/systemctl ]; then' >> $babel_script
echo ' systemctl stop networking' >> $babel_script echo ' systemctl stop network-manager' >> $babel_script
echo 'else' >> $babel_script echo 'else' >> $babel_script
echo ' service network-manager stop' >> $babel_script echo ' service network-manager stop' >> $babel_script
echo 'fi' >> $babel_script echo 'fi' >> $babel_script
@ -200,7 +200,7 @@ function mesh_batman {
echo ' echo "info: enabling batman-adv mesh network $ESSID on $IFACE"' >> $batman_script echo ' echo "info: enabling batman-adv mesh network $ESSID on $IFACE"' >> $batman_script
echo ' if [ -f /bin/systemctl ]; then' >> $batman_script echo ' if [ -f /bin/systemctl ]; then' >> $batman_script
echo ' systemctl stop networking' >> $batman_script echo ' systemctl stop network-manager' >> $batman_script
echo ' else' >> $batman_script echo ' else' >> $batman_script
echo ' service network-manager stop' >> $batman_script echo ' service network-manager stop' >> $batman_script
echo ' fi' >> $batman_script echo ' fi' >> $batman_script
@ -263,7 +263,7 @@ function mesh_batman {
echo ' iwconfig $IFACE mode managed' >> $batman_script echo ' iwconfig $IFACE mode managed' >> $batman_script
echo '' >> $batman_script echo '' >> $batman_script
echo ' if [ -f /bin/systemctl ]; then' >> $batman_script echo ' if [ -f /bin/systemctl ]; then' >> $batman_script
echo ' systemctl restart networking' >> $batman_script echo ' systemctl restart network-manager' >> $batman_script
echo ' else' >> $batman_script echo ' else' >> $batman_script
echo ' service network-manager restart' >> $batman_script echo ' service network-manager restart' >> $batman_script
echo ' fi' >> $batman_script echo ' fi' >> $batman_script