From: Michael Tremer Date: Fri, 20 Sep 2024 11:16:44 +0000 (+0200) Subject: wlanap.cgi: Don't try to show status if there is no interface X-Git-Tag: v2.29-core189~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b165dcdd803ba278013b1af03a8269f8994cb5f7;p=ipfire-2.x.git wlanap.cgi: Don't try to show status if there is no interface Signed-off-by: Michael Tremer --- diff --git a/html/cgi-bin/wlanap.cgi b/html/cgi-bin/wlanap.cgi index 5a22c7f259..b5052ac539 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();