summaryrefslogtreecommitdiff
path: root/op-mode-definitions/monitor-log.xml.in
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-06-09 20:04:07 +0200
committerChristian Breunig <christian@breunig.cc>2024-06-10 10:31:04 +0200
commit7ed4abe6cb3886889190f1f7a80c0229fd3a9c78 (patch)
tree454a36b5e7dcefc97313f2ce9c3106dceae85d05 /op-mode-definitions/monitor-log.xml.in
parent82607438d6df5291c581d802c7a2a98eabe084ff (diff)
downloadvyos-1x-7ed4abe6cb3886889190f1f7a80c0229fd3a9c78.tar.gz
vyos-1x-7ed4abe6cb3886889190f1f7a80c0229fd3a9c78.zip
wireless: T6462: add op-mode command for hostapd and wpa_supplicant logs
* monitor log wireless hostapd [interface <name>] * monitor log wireless wpa-supplicant [interface <name>] * show log wireless hostapd [interface <name>] * show log wireless wpa-supplicant [interface <name>]
Diffstat (limited to 'op-mode-definitions/monitor-log.xml.in')
-rw-r--r--op-mode-definitions/monitor-log.xml.in41
1 files changed, 41 insertions, 0 deletions
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 @@
</properties>
<command>journalctl --no-hostname --boot --follow --unit keepalived.service</command>
</leafNode>
+ <node name="wireless">
+ <properties>
+ <help>Monitor last lines of Wireless interface log</help>
+ </properties>
+ <children>
+ <node name="wpa-supplicant">
+ <properties>
+ <help>Monitor last lines of WPA supplicant</help>
+ </properties>
+ <command>if cli-shell-api existsActive interfaces wireless; then journalctl --no-hostname --boot --follow --unit "wpa_supplicant@*.service"; else echo "No wireless interface configured!"; fi</command>
+ <children>
+ <tagNode name="interface">
+ <properties>
+ <help>Monitor last lines of specific wireless interface supplicant</help>
+ <completionHelp>
+ <path>interfaces wireless</path>
+ </completionHelp>
+ </properties>
+ <command>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</command>
+ </tagNode>
+ </children>
+ </node>
+ <node name="hostapd">
+ <properties>
+ <help>Monitor last lines of host access point daemon</help>
+ </properties>
+ <command>if cli-shell-api existsActive interfaces wireless; then journalctl --no-hostname --boot --follow --unit "hostapd@*.service"; else echo "No wireless interface configured!"; fi</command>
+ <children>
+ <tagNode name="interface">
+ <properties>
+ <help>Monitor last lines of specific host access point interface</help>
+ <completionHelp>
+ <path>interfaces wireless</path>
+ </completionHelp>
+ </properties>
+ <command>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</command>
+ </tagNode>
+ </children>
+ </node>
+ </children>
+ </node>
</children>
</node>
</children>