/etc/powerman/vpc.dev is in powerman 2.3.5-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | #
# $Id: vpc.dev 1093 2008-12-02 01:00:05Z garlick $
#
specification "vpc" {
timeout 5.0
plug name { "0" "1" "2" "3" "4" "5" "6" "7" "8"
"9" "10" "11" "12" "13" "14" "15" }
script login {
send "login\n"
expect "[0-9]* OK\n"
expect "[0-9]* vpc> "
}
script logout {
send "logoff\n"
expect "[0-9]* OK\n"
}
script status_all {
send "stat *\n"
foreachplug {
expect "plug ([0-9]+): (ON|OFF)\n"
setplugstate $1 $2 on="ON" off="OFF"
}
expect "[0-9]* OK\n"
expect "[0-9]* vpc> "
}
script on {
send "on %s\n"
expect "[0-9]* OK\n"
expect "[0-9]* vpc> "
}
script on_all {
send "on *\n"
expect "[0-9]* OK\n"
expect "[0-9]* vpc> "
}
script off {
send "off %s\n"
expect "[0-9]* OK\n"
expect "[0-9]* vpc> "
}
script off_all {
send "off *\n"
expect "[0-9]* OK\n"
expect "[0-9]* vpc> "
}
script cycle {
send "off %s\n"
expect "[0-9]* OK\n"
expect "[0-9]* vpc> "
delay 1.0
send "on %s\n"
expect "[0-9]* OK\n"
expect "[0-9]* vpc> "
}
script cycle_all {
send "off *\n"
expect "[0-9]* OK\n"
expect "[0-9]* vpc> "
delay 1.0
send "on *\n"
expect "[0-9]* OK\n"
expect "[0-9]* vpc> "
}
script beacon_on {
send "flash %s\n"
expect "[0-9]* OK\n"
expect "[0-9]* vpc> "
}
script beacon_off {
send "unflash %s\n"
expect "[0-9]* OK\n"
expect "[0-9]* vpc> "
}
script status_beacon_all {
send "beacon *\n"
foreachplug {
expect "plug ([0-9]+): (ON|OFF)\n"
setplugstate $1 $2 on="ON" off="OFF"
}
expect "[0-9]* OK\n"
expect "[0-9]* vpc> "
}
script status_temp_all {
send "temp *\n"
foreachplug {
expect "plug ([0-9]+): ([0-9]+)\n"
setplugstate $1 $2
}
expect "[0-9]* OK\n"
expect "[0-9]* vpc> "
}
script reset_all {
send "reset *\n"
expect "[0-9]* OK\n"
expect "[0-9]* vpc> "
}
script reset {
send "reset %s\n"
expect "[0-9]* OK\n"
expect "[0-9]* vpc> "
}
}
|