This file is indexed.

/etc/powerman/baytech-rpc3-nc.dev is in powerman 2.3.5-1.

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
#
# $Id: baytech-rpc3-nc.dev 1123 2009-03-29 17:47:32Z garlick $
#
# Baytech RPC3-20NC
#
# Tested the following firmware versions:
#   RPC3-NC Series (C) 2002 by BayTech F4.00
#   RPC-3/4(A)DE Series (C) 2004 BayTech F1.08
#   RPC-3/4(A)DE Series (C) 2004 BayTech F1.09
# 
# Note:
#   Type ";;;;;" to access "network interface module".
#   Prompt is not returned until device is ready to accept another commmand.
#
# Assumes:
#   Command confirmation : disabled
#   Status menu : disabled
#   No access control
#   No idle timeout
#   No active restore (causes disconnections)
#
specification "baytech-rpc3-nc" {
	timeout 	10   # about 5 sec for cycle command

	plug name { "1" "2" "3" "4" "5" "6" "7" "8" }

	script login {
		send "\r\n"
		expect ">"
	}
	script logout {
		send "exit\r\n"
	}
	script status_all {
		# XXX this works around bug where foreachplug
		# counter doesn't reset when script restarts after reconnect
		send "\r\n"
		expect ">"
		# XXX end workaround
		send "status\r\n"
		foreachplug {
			expect "Outlet  ([0-9]+)[^:0-9]+: (On|Off)"
			setplugstate $1 $2 on="On" off="Off"
		}
		expect ">"
	}
	script on {
		send "on %s\r\n"
		expect ">"
	}
	script on_all {
		send "on 0\r\n"
		expect ">"
	}
	script off {
		send "off %s\r\n"
		expect ">"
	}
	script off_all {
		send "off 0\r\n"
		expect ">"
	}
# If outlet is initially off, "reboot" will leave it off.
# This doesn't match PowerMan's semantics for cycle, so explicitly power
# off then on.
	script cycle {
		send "off %s\r\n"
		expect ">"
		delay 4
		send "on %s\r\n"
		expect ">"
	}
	script cycle_all {
		send "off 0\r\n"
		expect ">"
		delay 4
		send "on 0\r\n"
		expect ">"
	}
}