summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorSimon Rettberg2023-07-06 12:16:56 +0200
committerSimon Rettberg2023-07-06 12:16:56 +0200
commit6d616ec188f9dd66c83e15904a7b9fc7130eb6c0 (patch)
tree5a9b6f4ec997c22f363228cc325a3398f5469528 /modules
parent[dev] Support >= 10 partitions (diff)
downloadslx-tools-6d616ec188f9dd66c83e15904a7b9fc7130eb6c0.tar.gz
slx-tools-6d616ec188f9dd66c83e15904a7b9fc7130eb6c0.tar.xz
slx-tools-6d616ec188f9dd66c83e15904a7b9fc7130eb6c0.zip
[is] New module
Diffstat (limited to 'modules')
-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
+}