]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
hostapd: Allow to adjust the debug level
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 23 Jul 2025 16:00:29 +0000 (18:00 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 22 Sep 2025 11:46:24 +0000 (11:46 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/initscripts/packages/hostapd

index ef4fb3b7659a03dd2146f7d72c810be4b70c9a6a..39507cd09e0bf3605c2f2995e4c219f633f0daaf 100644 (file)
@@ -683,8 +683,10 @@ case "${1}" in
                )
 
                # Enable debugging?
-               if [ -n "${DEBUG}" ]; then
-                       args+=( "-ddd" )
+               if [ -n "${DEBUG}" ] && [[ "${DEBUG}" =~ ^[0-9]+$ ]]; then
+                       for (( i = 0; i < DEBUG; i++ )); do
+                               args+=( "-d" )
+                       done
                fi
 
                boot_mesg "Starting hostapd... "