summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2024-03-01 17:31:31 +0100
committerSimon Rettberg2024-03-01 17:31:31 +0100
commit6a1946e8185580c78b14490ff39f491c11d93dba (patch)
treeb64692470eb59e0c417c62bd31764d2296affe1e
parent[is] Add is_debug: Check whether system is running in debug mode (diff)
downloadslx-tools-master.tar.gz
slx-tools-master.tar.xz
slx-tools-master.zip
is_debug: Refine KCL regexHEADmaster
-rw-r--r--modules/is.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/is.inc b/modules/is.inc
index 3d623b8..7ea44e7 100644
--- a/modules/is.inc
+++ b/modules/is.inc
@@ -19,7 +19,7 @@ is_debug() {
fi
fi
# Replace function for future calls as this is const
- if is_on "$SLX_DEBUG" || grep -qE '\bdebug\b' "/proc/cmdline"; then
+ if is_on "$SLX_DEBUG" || grep -qE '(^|[[:space:]]|\bslx\.)debug($|[[:space:]]|=)' "/proc/cmdline"; then
is_debug() {
return 0
}