]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
hostapd: Allow to enable debugging
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 23 Jul 2025 13:51:10 +0000 (15:51 +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 53d77545fc8c1a262f2af7fdc851aba06e55ffee..86d977f80e7663f6fe620d69c3e3230a2c623f80 100644 (file)
@@ -446,8 +446,22 @@ case "${1}" in
                        exit 1
                fi
 
+               # Compose the command line
+               args=(
+                       /usr/bin/hostapd
+                       -s
+                       -B
+                       /etc/hostapd.conf
+                       -i "${interface}"
+               )
+
+               # Enable debugging?
+               if [ -n "${DEBUG}" ]; then
+                       args+=( "-ddd" )
+               fi
+
                boot_mesg "Starting hostapd... "
-               loadproc /usr/bin/hostapd -s -B /etc/hostapd.conf -i "${interface}"
+               loadproc "${args[@]}"
                ;;
 
        stop)