There's a race condition for if the VM gets powered off between the
[invirt/packages/invirt-remote.git] / files / usr / sbin / sipb-xen-remote-control
index 3ee3e70..6d30d71 100755 (executable)
@@ -30,8 +30,11 @@ def main(argv):
               stdout=PIPE, stderr=PIPE)
     (out, err) = p.communicate()
     if p.returncode == 1:
-        print >>sys.stderr, "ERROR: invalid command"
+        print >>sys.stderr, "machine '%s' is not on" % machine_name
         return 1
+    elif p.returncode == 34:
+        print >>sys.stderr, "ERROR: invalid command"
+        return 34
     sys.stderr.write(err)
     sys.stdout.write(out)
     return p.returncode