X-Git-Url: http://git.onelab.eu/?p=pcucontrol.git;a=blobdiff_plain;f=pcucontrol%2Fmodels%2Fexp%2FDRAC.exp;fp=pcucontrol%2Fmodels%2Fexp%2FDRAC.exp;h=b3b19905ca3dcda0e877c3665104feb3ad5ef5b1;hp=35e91840c8a98e19a7e9daf80e73f0f510de5be3;hb=b0f9cc9ead4e2fec119199ec942165f2cefbe060;hpb=69aa221b1ae2926c895187fc2473ce4898ae892b diff --git a/pcucontrol/models/exp/DRAC.exp b/pcucontrol/models/exp/DRAC.exp old mode 100755 new mode 100644 index 35e9184..b3b1990 --- a/pcucontrol/models/exp/DRAC.exp +++ b/pcucontrol/models/exp/DRAC.exp @@ -36,7 +36,7 @@ if { "$method" == "ssh" } { "Could not resolve hostname" { send_user "DRAC ssh: $expect_out(0,string)"; exit } "Connection timed out" { send_user "DRAC ssh: $expect_out(0,string)"; exit } -re "Received disconnect.*" { send_user "DRAC ssh: $expect_out(0,string)"; exit} - -re "\\$|/.*>|\[$user\]#" { send "\r"; } + -re "\\$|/.*>|.*$user.*#" { send "\r"; } timeout { send_user "DRAC ssh: timeout" ; exit; } eof { if { $cont == 1 } { send_user "DRAC ssh failed twice"; exit ; } ; set cont 1 } } @@ -47,15 +47,15 @@ if { "$method" == "ssh" } { if { "$dryrun" == "True" } { expect { -re "\\$|/.*>" { send "racadm getsysinfo\r"; } - -re "\[$user\]#" { send "getsysinfo\r" } + -re ".*$user.*#" { send "getsysinfo\r" } } } else { expect { -re "\\$|/.*>" { send "racadm serveraction powercycle\r"; } - -re "\[$user\]#" { send "serveraction powercycle\r" } + -re ".*$user.*#" { send "serveraction powercycle\r" } } } - expect -re "\\$|/.*>|\[$user\]#" { send "exit\r"; } + expect -re "\\$|/.*>|.*$user.*#" { send "exit\r"; } expect eof { send_user "$reset_msg\n" }