git://git.onelab.eu
/
pcucontrol.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix regex to match DRACs with username in ssh prompt.
[pcucontrol.git]
/
pcucontrol
/
reboot.py
diff --git
a/pcucontrol/reboot.py
b/pcucontrol/reboot.py
index
eef8d2e
..
c127ac0
100755
(executable)
--- a/
pcucontrol/reboot.py
+++ b/
pcucontrol/reboot.py
@@
-359,9
+359,14
@@
class BasicPCUControl(PCUModel):
def run_expect_script(self, scriptname, **args):
locfg = command.CMD()
def run_expect_script(self, scriptname, **args):
locfg = command.CMD()
+ if 'ip' in args:
+ host = self.ip
+ else:
+ host = self.host
+
cmd_str = get_python_lib(1) + "/pcucontrol/models/exp/"
cmd = cmd_str + "%s %s %s '%s' %s %s " % (
cmd_str = get_python_lib(1) + "/pcucontrol/models/exp/"
cmd = cmd_str + "%s %s %s '%s' %s %s " % (
- scriptname,
self.
host, self.username,
+ scriptname, host, self.username,
self.password, args['dryrun'], args['model'])
print cmd
cmd_out, cmd_err = locfg.run_noexcept(cmd)
self.password, args['dryrun'], args['model'])
print cmd
cmd_out, cmd_err = locfg.run_noexcept(cmd)