summaryrefslogtreecommitdiff
path: root/op-mode-definitions
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-06-01 13:55:10 +0200
committerChristian Poessinger <christian@poessinger.com>2020-06-01 13:55:14 +0200
commita21f57dd78cf30838769311706397f1b2077056b (patch)
tree9d7998c14936615120c7e2254108605465f5ded0 /op-mode-definitions
parentac0c863c71e74a9ce1dc0e84d45c1d060ad39441 (diff)
downloadvyos-1x-a21f57dd78cf30838769311706397f1b2077056b.tar.gz
vyos-1x-a21f57dd78cf30838769311706397f1b2077056b.zip
wake-on-lan: op-mode: T2526: add CLI implementation
Wake up host vyos@vyos:~$ wake-on-lan interface eth0.201 host a:b:c:d:e:f Wake up invalid host vyos@vyos:~$ wake-on-lan interface eth0.201 host a:b:c:d:e:f:f etherwake: The Magic Packet host address must be specified as - a station address, 00:11:22:33:44:55, or - a hostname with a known 'ethers' entry.
Diffstat (limited to 'op-mode-definitions')
-rw-r--r--op-mode-definitions/wake-on-lan.xml26
1 files changed, 26 insertions, 0 deletions
diff --git a/op-mode-definitions/wake-on-lan.xml b/op-mode-definitions/wake-on-lan.xml
new file mode 100644
index 000000000..1a9b88596
--- /dev/null
+++ b/op-mode-definitions/wake-on-lan.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="wake-on-lan">
+ <properties>
+ <help>Send Wake-On-LAN (WOL) Magic Packet</help>
+ </properties>
+ <children>
+ <tagNode name="interface">
+ <properties>
+ <help>Interface where the station is connected</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_interfaces.py</script>
+ </completionHelp>
+ </properties>
+ <children>
+ <tagNode name="host">
+ <properties>
+ <help>Station (MAC) address to wake up</help>
+ </properties>
+ <command>sudo /usr/sbin/etherwake -i "$3" "$5"</command>
+ </tagNode>
+ </children>
+ </tagNode>
+ </children>
+ </node>
+</interfaceDefinition>