浏览代码

Commands to switch between wired and wireless mesh

Bob Mottram 7 年前
父节点
当前提交
0d7c503363
共有 1 个文件被更改,包括 12 次插入0 次删除
  1. 12
    0
      src/freedombone-image-customise

+ 12
- 0
src/freedombone-image-customise 查看文件

@@ -973,6 +973,18 @@ initialise_mesh() {
973 973
         MESH_STARTUP_PARAMS="${MY_USERNAME} amnesic"
974 974
     fi
975 975
 
976
+    # command to switch to wired mesh
977
+    { echo '#!/bin/bash';
978
+      echo 'echo -n "eth" > /root/.mesh_interface_type';
979
+      echo 'systemctl reboot -i'; } > "$rootdir/usr/bin/wired"
980
+    chmod +x "$rootdir/usr/bin/wired"
981
+
982
+    # command to switch to wireless mesh
983
+    { echo '#!/bin/bash';
984
+      echo 'echo -n "wlan" > /root/.mesh_interface_type';
985
+      echo 'systemctl reboot -i'; } > "$rootdir/usr/bin/wireless"
986
+    chmod +x "$rootdir/usr/bin/wireless"
987
+
976 988
     { echo '[Unit]';
977 989
       echo 'Description=Initial mesh router configuration';
978 990
       echo 'After=syslog.target';