Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-release > by-pkgid > db8d50b45fb15e865b7becf99650beea > files > 43

powerman-2.3.25-1.mga7.armv7hl.rpm

# 
# $Id$
#
# This device configuration supports power control via the 
# 'ipmipower' utility.
#
# See powerman-devices(7) for more info on running ipmipower under
# powerman.
#
# some IPMI devices require some time for the firmware to
# reload/re-settle itself after a power-off.  A delay of 5 seconds
# seems to work fine pretty well.
#
# off,delay,on used in place of IPMI cycle to ensure full command
# completion before returning to the user.
#
specification "ipmipower" {
	timeout  	60

	script login {
		expect "ipmipower> "
	}
	script logout {
		send "quit\n"
	}
	script status_all {
		send "stat\n"
		foreachnode {
			expect "([^\n:]+): ([^\n]+\n)"
			setplugstate $1 $2 on="^on\n" off="^off\n"
		}
		expect "ipmipower> "
	}
	script status_beacon_all {
		send "identify-status\n"
		foreachnode {
			expect "([^\n:]+): ([^\n]+\n)"
			setplugstate $1 $2 on="^on\n" off="^off\n"
		}
		expect "ipmipower> "
	}
	script on_ranged {
		send "on %s\n"
		expect "ipmipower> "
	}
	script off_ranged {
		send "off %s\n"
		expect "ipmipower> "
	}
	script cycle_ranged {
		send "off %s\n"
		expect "ipmipower> "
		delay 5
		send "on %s\n"
		expect "ipmipower> "
	}
	script beacon_on_ranged {
		send "identify-on %s\n"
		expect "ipmipower> "
	}
	script beacon_off_ranged {
		send "identify-off %s\n"
		expect "ipmipower> "
	}
}