[pve-devel] [PATCH pve-manager 1/2] Nodes: wakeonlan return MAC address send via WOL packet

Christian Ebner c.ebner at proxmox.com
Fri Jan 18 11:13:08 CET 2019


The wake on LAN call now returns a string containing the MAC address send in the
WOL packet.

Signed-off-by: Christian Ebner <c.ebner at proxmox.com>
---
 PVE/API2/Nodes.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/PVE/API2/Nodes.pm b/PVE/API2/Nodes.pm
index 7f829b29..2c8bfc35 100644
--- a/PVE/API2/Nodes.pm
+++ b/PVE/API2/Nodes.pm
@@ -485,7 +485,7 @@ __PACKAGE__->register_method({
 	    }),
 	},
     },
-    returns => { type => "null" },
+    returns => { type => 'string' },
     code => sub {
 	my ($param) = @_;
 
@@ -511,7 +511,7 @@ __PACKAGE__->register_method({
 
 	close($sock);
 
-	return undef;
+	return $config->{wakeonlan};
     }});
 
 __PACKAGE__->register_method({
-- 
2.11.0




More information about the pve-devel mailing list