Commands to switch between wired and wireless mesh

This commit is contained in:
Bob Mottram 2018-03-07 17:26:48 +00:00
parent e209eef34e
commit 0d7c503363
1 changed files with 12 additions and 0 deletions

View File

@ -973,6 +973,18 @@ initialise_mesh() {
MESH_STARTUP_PARAMS="${MY_USERNAME} amnesic" MESH_STARTUP_PARAMS="${MY_USERNAME} amnesic"
fi fi
# command to switch to wired mesh
{ echo '#!/bin/bash';
echo 'echo -n "eth" > /root/.mesh_interface_type';
echo 'systemctl reboot -i'; } > "$rootdir/usr/bin/wired"
chmod +x "$rootdir/usr/bin/wired"
# command to switch to wireless mesh
{ echo '#!/bin/bash';
echo 'echo -n "wlan" > /root/.mesh_interface_type';
echo 'systemctl reboot -i'; } > "$rootdir/usr/bin/wireless"
chmod +x "$rootdir/usr/bin/wireless"
{ echo '[Unit]'; { echo '[Unit]';
echo 'Description=Initial mesh router configuration'; echo 'Description=Initial mesh router configuration';
echo 'After=syslog.target'; echo 'After=syslog.target';