File: hpmp.dev

package info (click to toggle)
powerman 2.4.4-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,432 kB
  • sloc: ansic: 19,458; sh: 7,225; yacc: 694; makefile: 455; lex: 272
file content (65 lines) | stat: -rw-r--r-- 1,397 bytes parent folder | download | duplicates (4)
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
59
60
61
62
63
64
65
# HP Management Processor device (MP)
# a.k.a. Integrated Lights-Out HP Integrity
#
# (c) Copyright 2009 Hewlett-Packard Development Company, L.P.
#	Bjorn Helgaas <bjorn.helgaas@hp.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# Example:
#	device "rx3600-001" "hpmp" "rx3600-001-mp.test:23"
#	node   "rx3600-001" "rx3600-001"
#
# Tested on:
#	rx3600 (MP firmware F.01.41)
#	rx1600 (MP firmware E.03.30)
#	rx1620 (MP firmware E.03.30)

specification  "hpmp" {
	timeout 10
	plug name { "1" }

	script login {
		expect "MP login: "
		send "Admin\r\n"
		expect "MP password: "
		send "Admin\r\n"
		expect "MP> "
		send "cm\r\n"
		expect "MP:CM> "
	}
	script status {
		send "ps\r\n"
		expect "System Power state[^O]+(On|Off)"
		setplugstate "1" $1 on="On" off="Off"
		expect "MP:CM> "
	}
	script on {
		send "pc -on -nc\r\n"
		expect "MP:CM> "
	}
	script off {
		send "pc -off -nc\r\n"
		expect "MP:CM> "
	}
	script reset {
		send "rs -nc\r\n"
		expect "MP:CM> "
	}
	script status_beacon {
		send "loc -nc\r\n"
		expect "Current -> Locator LED (On|Off)"
		setplugstate "1" $1 on="On" off="Off"
		expect "MP:CM> "
	}
	script beacon_on {
		send "loc -on -nc\r\n"
		expect "MP:CM> "
	}
	script beacon_off {
		send "loc -off -nc\r\n"
		expect "MP:CM> "
	}
}