summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/is.inc6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/is.inc b/modules/is.inc
new file mode 100644
index 0000000..17e8a0d
--- /dev/null
+++ b/modules/is.inc
@@ -0,0 +1,6 @@
+#!/bin/ash
+
+is_on() {
+ [ "$1" = "ON" ] || [ "$1" = "on" ] || [ "$1" = "YES" ] || [ "$1" = "yes" ] || [ "$1" = "true" ] || [ "$1" = "TRUE" ] || [ "$1" -ne 0 ] 2>/dev/null || return 1
+ return 0
+}