lib/rubyipmi/ipmitool/commands/power.rb in rubyipmi-0.6.0 vs lib/rubyipmi/ipmitool/commands/power.rb in rubyipmi-0.7.0
- old
+ new
@@ -14,16 +14,24 @@
return value
end
# Turn on the system
def on
- command("on")
+ if off?
+ command("on")
+ else
+ return true
+ end
end
# Turn off the system
def off
- command("off")
+ if off?
+ return true
+ else
+ command("off")
+ end
end
# Power cycle the system
def cycle
# if the system is off turn it on
@@ -65,10 +73,8 @@
# Test to see if the power is off
def off?
status == "off"
end
-
-
end
end
\ No newline at end of file