summaryrefslogtreecommitdiff
path: root/bin/check-booting-mode.sh
diff options
context:
space:
mode:
Diffstat (limited to 'bin/check-booting-mode.sh')
-rwxr-xr-xbin/check-booting-mode.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/bin/check-booting-mode.sh b/bin/check-booting-mode.sh
new file mode 100755
index 0000000..4ec61dc
--- /dev/null
+++ b/bin/check-booting-mode.sh
@@ -0,0 +1,13 @@
+#! /bin/sh
+# Checking special mode booting.
+# * Charging mode: Turn the phone on with the charger connection.
+# * FOTA mode: Firmware update On-The-Air
+#
+
+for i in `/bin/cat /proc/cmdline` ; do
+ echo $i
+ if [ "$i" = "charger_detect_boot" ] || [ "$i" = "fota_update_boot" ]; then
+ exit 0
+ fi
+done
+exit 1