Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/hakchi2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mods/mod_hakchi/hakchi/rootfs/bin/hsqs')
-rwxr-xr-xmods/mod_hakchi/hakchi/rootfs/bin/hsqs22
1 files changed, 22 insertions, 0 deletions
diff --git a/mods/mod_hakchi/hakchi/rootfs/bin/hsqs b/mods/mod_hakchi/hakchi/rootfs/bin/hsqs
new file mode 100755
index 00000000..0b1d9d2d
--- /dev/null
+++ b/mods/mod_hakchi/hakchi/rootfs/bin/hsqs
@@ -0,0 +1,22 @@
+#!/bin/sh
+source /etc/preinit
+script_init
+
+echo "current firmware: $(currentFirmware)"
+printSoftwareInfo
+
+firmware="$1"
+if [ "$firmware" != "_nand_" ]; then
+ firmware="$(readlink -f "$1")"
+ checkFirmware "$firmware" || exit 1
+fi
+
+[ "$cfg_firmware" == "$firmware" ] && exit 0
+cfg_firmware="$firmware"
+save_config
+
+[ "$(currentFirmware)" == "$firmware" ] && exit 0
+
+echo "changing firmware to: $firmware"
+reboot
+exit 0