|
@@ -13,11 +13,11 @@ longitude=$4
|
|
|
[ -z "$hostname" ] && { echo "USAGE: $0 <hostname> <owner> [<latitude> <longitude>]"; exit 1; }
|
|
|
[ -z "$owner" ] && { echo "ERROR: need at least hostname and owner as params"; exit 1; }
|
|
|
|
|
|
-if [ "$IDid" != "ReadTheScript" ]; then
|
|
|
- echo "WORK IN PROGRESS: Dieses Skript ist noch nicht fertig und tut nicht was es soll."
|
|
|
- echo "Die uci-set Kommandos werden scheinbar nicht ausgeführt!"
|
|
|
- exit 42
|
|
|
-fi
|
|
|
+#if [ "$IDid" != "ReadTheScript" ]; then
|
|
|
+# echo "WORK IN PROGRESS: Dieses Skript ist noch nicht fertig und tut nicht was es soll."
|
|
|
+# echo "Die uci-set Kommandos werden scheinbar nicht ausgeführt!"
|
|
|
+# exit 42
|
|
|
+#fi
|
|
|
|
|
|
mac=`echo "lua -e 'print(require(\"gluon.sysconfig\").primary_mac)'" | nc -q1 192.168.1.1 23 | grep -o '^[0-9a-fA-F\:]\{17\}'`
|
|
|
|
|
@@ -42,11 +42,13 @@ else
|
|
|
fi
|
|
|
cmd 'uci commit gluon-node-info'
|
|
|
|
|
|
-cmd 'uci set gluon-config-mode.@setup-mode[0].configured=1'
|
|
|
-cmd 'uci commit gluon-config-mode'
|
|
|
+cmd 'uci set gluon-setup-mode.@setup_mode[0]=setup_mode'
|
|
|
+cmd 'uci set gluon-setup-mode.@setup_mode[0].enabled=0'
|
|
|
+cmd 'uci set gluon-setup-mode.@setup_mode[0].configured=1'
|
|
|
+cmd 'uci commit gluon-setup-mode'
|
|
|
|
|
|
cmd 'uci commit'
|
|
|
-#cmd "poweroff"
|
|
|
+cmd "reboot"
|
|
|
|
|
|
echo "# Owner: $owner"
|
|
|
echo "# MAC: $mac"
|