summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/openslx
diff options
context:
space:
mode:
authorSimon Rettberg2022-01-31 15:31:04 +0100
committerSimon Rettberg2022-01-31 15:31:04 +0100
commit476d04133d938715094456326639f1e71e5a9c07 (patch)
treef9c82722601df1c570b8c5f2495b5a4094294f37 /src/main/java/org/openslx
parent[WakeOnLan] Don't pass bogus machineuuid, triggers sanity check on client (diff)
downloadtmlite-bwlp-476d04133d938715094456326639f1e71e5a9c07.tar.gz
tmlite-bwlp-476d04133d938715094456326639f1e71e5a9c07.tar.xz
tmlite-bwlp-476d04133d938715094456326639f1e71e5a9c07.zip
[WakeOnLan] Rename var, more verbose log output
Diffstat (limited to 'src/main/java/org/openslx')
-rw-r--r--src/main/java/org/openslx/taskmanager/tasks/WakeOnLan.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/org/openslx/taskmanager/tasks/WakeOnLan.java b/src/main/java/org/openslx/taskmanager/tasks/WakeOnLan.java
index 22f9f69..7a4a58e 100644
--- a/src/main/java/org/openslx/taskmanager/tasks/WakeOnLan.java
+++ b/src/main/java/org/openslx/taskmanager/tasks/WakeOnLan.java
@@ -103,14 +103,14 @@ public class WakeOnLan extends AbstractTask
final String method = parts[0];
final List<String> macs = it.getValue();
final String macString = Strings.join( macs.iterator(), ' ' );
- final String ip = parts[1];
+ final String broadcastIp = parts[1];
final int jobId = ++jobIdCounter;
if ( method.equalsIgnoreCase( "DIRECT" ) ) {
// Directly from server
waitList.add( tp.submit( () -> {
status.addMsg( jobId + ": Waking directly from server: " + macString );
WakeOnLanExecutor wol = new WakeOnLanExecutor( null );
- String[] success = wol.execute( status, macs, ip, this.port );
+ String[] success = wol.execute( status, macs, broadcastIp, this.port );
markSuccess( Arrays.asList( success ) );
if ( success.length == macs.size() ) {
status.addMsg( jobId + ": Done" );
@@ -122,8 +122,8 @@ public class WakeOnLan extends AbstractTask
// Via SSH
waitList.add( tp.submit( () -> {
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 );
+ status.addMsg( jobId + ": Waking via SSH from " + sshData.ip + " to " + broadcastIp + ": " + macString );
+ String command = sshData.command.replace( "%MACS%", macString ).replace( "%IP%", broadcastIp );
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();