diff options
author | Simon Rettberg | 2022-01-31 15:14:11 +0100 |
---|---|---|
committer | Simon Rettberg | 2022-01-31 15:14:11 +0100 |
commit | da298934607cdc6bdae19562f0aaa08dcb80970c (patch) | |
tree | 2698293b75da8e0b02cbeb5462aa7aeee60061bd /src | |
parent | [RemoteExec] Fix instantiating via parametrized constructor (diff) | |
download | tmlite-bwlp-da298934607cdc6bdae19562f0aaa08dcb80970c.tar.gz tmlite-bwlp-da298934607cdc6bdae19562f0aaa08dcb80970c.tar.xz tmlite-bwlp-da298934607cdc6bdae19562f0aaa08dcb80970c.zip |
[WakeOnLan] Don't pass bogus machineuuid, triggers sanity check on client
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/openslx/taskmanager/tasks/WakeOnLan.java | 4 |
1 files 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 { |