1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
#
# Sun Integrated Lights Out Management card
#
# Verified on:
# Sunfire X4140 SP firmware 2.0.2.3 build 29049, SP file system 0.1.16
# Sunfire X4550 SP firmware 2.0.2.5 build 32394, SP file system 0.1.16
#
# Examples:
# over SER MGT RJ-45 (serial via cyclades)
# device "ilom" "ilom" "usr-ts:7016"
# over SER MGT RJ-45 (direct serial)
# device "ilom" "ilom" "/dev/ttyS1" "9600,8n1"
# over NET MGT RJ-45 (network over ssh)
# device "ilom" "ilom" "ssh -o StrictHostKeyChecking=no -lroot sol|&"
#
specification "ilom" {
timeout 10
plug name { "1" }
# login script handles three cases:
# 1) serial port, already logged in
# 2) serial port, not logged in
# 3) ssh, enter password only
script login {
send "\n"
expect "->|Password:|login: "
send "root\n"
expect "->|Password: "
send "changeme\n"
expect "->"
}
script status {
send "show -d properties /SYS\n"
expect "(POWERSTATE|power_state)[^Oo]+(On|Off|on|off)"
setplugstate "1" $2 on="On|on" off="Off|off"
expect "->"
}
script on {
send "start -script /SYS\n"
expect "->"
}
script off {
send "stop -script -force /SYS\n"
expect "->"
}
script cycle {
send "stop -script -force /SYS\n"
expect "->"
delay 4
send "start -script /SYS\n"
expect "->"
}
script reset {
send "reset -script /SYS\n"
expect "->"
}
}
|