From b165dcdd803ba278013b1af03a8269f8994cb5f7 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Fri, 20 Sep 2024 13:16:44 +0200 Subject: [PATCH] wlanap.cgi: Don't try to show status if there is no interface Signed-off-by: Michael Tremer --- html/cgi-bin/wlanap.cgi | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/html/cgi-bin/wlanap.cgi b/html/cgi-bin/wlanap.cgi index 5a22c7f25..b5052ac53 100644 --- a/html/cgi-bin/wlanap.cgi +++ b/html/cgi-bin/wlanap.cgi @@ -354,29 +354,33 @@ END &Header::closebox(); -&Header::opensection(); +if ($INTF) { -my @status = `iw dev $INTF info`; + &Header::opensection(); -if (@status) { - print <$Lang::tr{'wlanap wlan status'} + my @status = `iw dev $INTF info`; + + if (@status) { + print <$Lang::tr{'wlanap wlan status'} -
@status
+
@status
END -} + } -my @status = `iw dev $INTF station dump`; + @status = `iw dev $INTF station dump`; -if (@status) { - print <$Lang::tr{'wlanap clients'} + if (@status) { + print <$Lang::tr{'wlanap clients'} -
@status
+
@status
END + } + + &Header::closesection(); } -&Header::closesection(); &Header::closebigbox(); &Header::closepage(); -- 2.39.5