File: nutconf-dummy

package info (click to toggle)
nut 2.8.3-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 24,356 kB
  • sloc: ansic: 123,904; sh: 14,718; cpp: 12,558; makefile: 5,212; python: 1,114; perl: 855; xml: 47
file content (101 lines) | stat: -rwxr-xr-x 2,469 bytes parent folder | download | duplicates (2)
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
#!/bin/sh
# Script to fake nutconf, for integration purpose

# FIXME: to be completed!

# there must be at least 1 option!
if [ $# -lt 1 ] ; then
	echo "Error: no options provided!";
	exit 1;
fi

case $1 in
	--system)
		;;
	--mode)
		#standalone,netserver,netclient,controlled,manual,none
		;;
	--is-configured)
		# return "yes" / "no" + retval 0 / 1 if nut is configured or not
		;;
	# --scan-?options?)
		# FIXME: call nutscan??
	--scan-snmp)
		echo "SNMP:driver=\"snmp-ups\",port=\"166.99.224.106\",desc=\"Evolution\",mibs=\"mge\",community=\"public\""
		echo "SNMP:driver=\"snmp-ups\",port=\"166.99.224.155\",desc=\"Eaton ePDU AM 1P IN:IEC309 32A OUT:20xC13, 4xC19\",mibs=\"eaton_epdu\",community=\"public\""
		echo "SNMP:driver=\"snmp-ups\",port=\"166.99.224.111\",desc=\"Eaton 5P\",mibs=\"mge\",community=\"public\""
		echo "SNMP:driver=\"snmp-ups\",port=\"166.99.224.149\",desc=\"PW104MA0UC34\",mibs=\"aphel_revelation\",community=\"public\""
		;;
	--restart)
		# FIXME: restart NUT services after configuration
		;;
	--reload)
		# FIXME: reload NUT services after configuration
		;;
	--get-devices)
		#get the list of devices name
		;;
	--get-device)
		# FIXME: <device name>
		;;
    --set-device)
		# FIXME: <device name> <field>[=<value>] [<field>[=<value>]]
		;;
	--new-device)
		# FIXME: <device name> <driver> <port> [<desc>]
		;;
	--del-devices)
		# FIXME: 
		;;
	--del-device)
		# FIXME: <device name> [<field>]: either remove a field or the entire device entry
		;;
	--get-users)
		# FIXME: 
		;;
	--get-user)
		# FIXME: <user name>
		;;
	--set-user)
		# FIXME: <user name> <field>[=<value>]
		;;
	--new-user)
		# FIXME: ... needs completion with upsmon master slave/instcmd/set
		;;
	--del-user)
		# FIXME: 
		;;
	# --?generic-{s,g}etter?
		# FIXME: set or get a global or local param (need discussion)
		# upsd.conf/maxage, statepath, listen, maxconn, certfile
		# ups.conf/chroot, driverpath, maxstartdelay, pollinterval, user
		# ups.conf/drivers specific (see scripts/augeas/)
	# --?security-option?: I let M speak about the best way to configure NSS / OpenSSL

	--get-monitors)
		# FIXME:get the list of monitored systems (names only, but may also use a verbose flag to display details)
		;;
	--get-monitor)
		# FIXME:<system>: details...
		;;
	--set-monitor)
		# FIXME:TBD
		;;
	--new-monitor)
		# FIXME:TBD
		;;
	--get-notifycmds)
		# FIXME:
		;;
	--get-notifycmd)
		# FIXME:
		;;
	*)
		echo "nutconf Unknown option ($1)";
		#exit 1;
esac