From da298934607cdc6bdae19562f0aaa08dcb80970c Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 31 Jan 2022 15:14:11 +0100 Subject: [WakeOnLan] Don't pass bogus machineuuid, triggers sanity check on client --- src/main/java/org/openslx/taskmanager/tasks/WakeOnLan.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/openslx/taskmanager/tasks/WakeOnLan.java b/src/main/java/org/openslx/taskmanager/tasks/WakeOnLan.java index 17780b5..22f9f69 100644 --- a/src/main/java/org/openslx/taskmanager/tasks/WakeOnLan.java +++ b/src/main/java/org/openslx/taskmanager/tasks/WakeOnLan.java @@ -124,7 +124,7 @@ public class WakeOnLan extends AbstractTask SshData sshData = this.ssh.get( method ); status.addMsg( jobId + ": Waking via SSH to " + sshData.ip + ": " + macString ); String command = sshData.command.replace( "%MACS%", macString ).replace( "%IP%", ip ); - RemoteExec.Client c = new RemoteExec.Client( "x", sshData.ip, sshData.port, sshData.username ); + RemoteExec.Client c = new RemoteExec.Client( null, sshData.ip, sshData.port, sshData.username ); RemoteExec task = new RemoteExec( new RemoteExec.Client[] { c }, sshData.sshkey, sshData.port, command, 5 ); task.execute(); Output s = task.getStatusObject(); @@ -134,7 +134,7 @@ public class WakeOnLan extends AbstractTask if ( !Util.isEmpty( s.error ) ) { status.addMsg( s.error ); } - if ( s.result != null && s.result.containsKey( "x" ) && s.result.get( "x" ).exitCode == 0 ) { + if ( s.result != null && s.result.containsKey( sshData.ip ) && s.result.get( sshData.ip ).exitCode == 0 ) { markSuccess( macs ); status.addMsg( jobId + ": Done" ); } else { -- cgit v1.2.3-55-g7522