about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-05-23T18·04-0400
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-05-23T18·04-0400
commit72d8209548f2ba16e41a2faa850ab9af3616453d (patch)
treec805eb5ac45ad44d5e7c7c64249ba73dec2b924e
parent18a48d80a0686ba81959057e8becc6272acd6c46 (diff)
build-remote.pl: Indicate if remote machine is refusing builds
Fixes #120.
-rwxr-xr-xscripts/build-remote.pl.in5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/build-remote.pl.in b/scripts/build-remote.pl.in
index 00d7cd8b4186..dd56b600c75d 100755
--- a/scripts/build-remote.pl.in
+++ b/scripts/build-remote.pl.in
@@ -197,10 +197,11 @@ REQ: while (1) {
         $hostName = $machine->{hostName};
         if (openSSHConnection($hostName)) {
             last REQ if system("ssh $hostName @sshOpts nix-builds-inhibited < /dev/null > /dev/null 2>&1") != 0;
+            warn "machine `$hostName' is refusing builds, trying other available machines...\n";
             closeSSHConnection;
+        } else {
+            warn "unable to open SSH connection to `$hostName', trying other available machines...\n";
         }
-
-        warn "unable to open SSH connection to $hostName, trying other available machines...\n";
         $machine->{enabled} = 0;
     }
 }