From 7ed4abe6cb3886889190f1f7a80c0229fd3a9c78 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Sun, 9 Jun 2024 20:04:07 +0200 Subject: wireless: T6462: add op-mode command for hostapd and wpa_supplicant logs * monitor log wireless hostapd [interface ] * monitor log wireless wpa-supplicant [interface ] * show log wireless hostapd [interface ] * show log wireless wpa-supplicant [interface ] --- op-mode-definitions/monitor-log.xml.in | 41 ++++++++++++++++++++++++++++++++++ op-mode-definitions/show-log.xml.in | 41 ++++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+) (limited to 'op-mode-definitions') diff --git a/op-mode-definitions/monitor-log.xml.in b/op-mode-definitions/monitor-log.xml.in index 559952e25..a2d5d924a 100644 --- a/op-mode-definitions/monitor-log.xml.in +++ b/op-mode-definitions/monitor-log.xml.in @@ -359,6 +359,47 @@ journalctl --no-hostname --boot --follow --unit keepalived.service + + + Monitor last lines of Wireless interface log + + + + + Monitor last lines of WPA supplicant + + if cli-shell-api existsActive interfaces wireless; then journalctl --no-hostname --boot --follow --unit "wpa_supplicant@*.service"; else echo "No wireless interface configured!"; fi + + + + Monitor last lines of specific wireless interface supplicant + + interfaces wireless + + + if [[ $(cli-shell-api returnActiveValue interfaces wireless $6 type) == "station" ]]; then journalctl --no-hostname --boot --follow --unit "wpa_supplicant@$6.service"; else echo "Wireless interface $6 not configured as station!"; fi + + + + + + Monitor last lines of host access point daemon + + if cli-shell-api existsActive interfaces wireless; then journalctl --no-hostname --boot --follow --unit "hostapd@*.service"; else echo "No wireless interface configured!"; fi + + + + Monitor last lines of specific host access point interface + + interfaces wireless + + + if [[ $(cli-shell-api returnActiveValue interfaces wireless $6 type) == "access-point" ]]; then journalctl --no-hostname --boot --follow --unit "hostapd@$6.service"; else echo "Wireless interface $6 not configured as access-point!"; fi + + + + + diff --git a/op-mode-definitions/show-log.xml.in b/op-mode-definitions/show-log.xml.in index c3aa324ba..7ae3b890b 100644 --- a/op-mode-definitions/show-log.xml.in +++ b/op-mode-definitions/show-log.xml.in @@ -762,6 +762,47 @@ journalctl --no-hostname --boot --unit keepalived.service + + + Show log for Wireless interface + + + + + Show log for WPA supplicant + + if cli-shell-api existsActive interfaces wireless; then journalctl --no-hostname --boot --unit "wpa_supplicant@*.service"; else echo "No wireless interface configured!"; fi + + + + Show log for specific wireless interface supplicant + + interfaces wireless + + + if [[ $(cli-shell-api returnActiveValue interfaces wireless $6 type) == "station" ]]; then journalctl --no-hostname --boot --unit "wpa_supplicant@$6.service"; else echo "Wireless interface $6 not configured as station!"; fi + + + + + + Show log for host access point daemon + + if cli-shell-api existsActive interfaces wireless; then journalctl --no-hostname --boot --unit "hostapd@*.service"; else echo "No wireless interface configured!"; fi + + + + Show log for specific host access point daemon interface + + interfaces wireless + + + if [[ $(cli-shell-api returnActiveValue interfaces wireless $6 type) == "access-point" ]]; then journalctl --no-hostname --boot --unit "hostapd@$6.service"; else echo "Wireless interface $6 not configured as access-point!"; fi + + + + + Show log for Webproxy -- cgit v1.2.3