From: | "Robin H. Johnson (robbat2)" <robbat2@g.o> |
---|---|
To: | gentoo-commits@l.g.o |
Subject: | [gentoo-commits] gentoo-x86 commit in sys-power/nut/files: nut-2.2.2-init.d-upsmon nut-2.2.2-init.d-upsd nut-2.2.2-init.d-upsdrv |
Date: | Wed, 25 Jun 2008 02:29:10 |
Message-Id: | E1KBKkr-0006iC-5j@stork.gentoo.org |
1 | robbat2 08/06/25 02:29:05 |
2 | |
3 | Added: nut-2.2.2-init.d-upsmon nut-2.2.2-init.d-upsd |
4 | nut-2.2.2-init.d-upsdrv |
5 | Log: |
6 | Version bump per bug #226157. Fix bugs #177887, #211505 for baselayout2. Provide better support for multiple UPS per bug #149687. Please read the postinst about upsdrv!. |
7 | (Portage version: 2.2_rc1/cvs/Linux 2.6.26-rc4-00103-g1beee8d x86_64) |
8 | |
9 | Revision Changes Path |
10 | 1.1 sys-power/nut/files/nut-2.2.2-init.d-upsmon |
11 | |
12 | file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-power/nut/files/nut-2.2.2-init.d-upsmon?rev=1.1&view=markup |
13 | plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-power/nut/files/nut-2.2.2-init.d-upsmon?rev=1.1&content-type=text/plain |
14 | |
15 | Index: nut-2.2.2-init.d-upsmon |
16 | =================================================================== |
17 | #!/sbin/runscript |
18 | # Copyright 1999-2004 Gentoo Foundation |
19 | # Distributed under the terms of the GNU General Public License v2 |
20 | # $Header: /var/cvsroot/gentoo-x86/sys-power/nut/files/nut-2.2.2-init.d-upsmon,v 1.1 2008/06/25 02:29:04 robbat2 Exp $ |
21 | |
22 | opts="reload" |
23 | pidfile=/var/run/upsmon.pid |
24 | bin=/usr/sbin/upsmon |
25 | |
26 | depend() { |
27 | need net |
28 | } |
29 | |
30 | start() { |
31 | ebegin "Starting upsmon" |
32 | start-stop-daemon --start --quiet --exec /usr/sbin/upsmon |
33 | eend $? |
34 | } |
35 | |
36 | stop() { |
37 | ebegin "Stopping upsmon" |
38 | start-stop-daemon --stop --quiet --pidfile /var/run/upsmon.pid |
39 | eend $? |
40 | } |
41 | reload() { |
42 | ebegin "Reloading upsd" |
43 | start-stop-daemon --stop --signal HUP --oknodo --quiet --pidfile ${pidfile} |
44 | eend $? |
45 | } |
46 | |
47 | |
48 | |
49 | 1.1 sys-power/nut/files/nut-2.2.2-init.d-upsd |
50 | |
51 | file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-power/nut/files/nut-2.2.2-init.d-upsd?rev=1.1&view=markup |
52 | plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-power/nut/files/nut-2.2.2-init.d-upsd?rev=1.1&content-type=text/plain |
53 | |
54 | Index: nut-2.2.2-init.d-upsd |
55 | =================================================================== |
56 | #!/sbin/runscript |
57 | # Copyright 1999-2004 Gentoo Foundation |
58 | # Distributed under the terms of the GNU General Public License v2 |
59 | # $Header: /var/cvsroot/gentoo-x86/sys-power/nut/files/nut-2.2.2-init.d-upsd,v 1.1 2008/06/25 02:29:04 robbat2 Exp $ |
60 | |
61 | opts="reload" |
62 | pidfile=/var/lib/nut/upsd.pid |
63 | bin=/usr/sbin/upsd |
64 | |
65 | depend() { |
66 | need net |
67 | before upsmon |
68 | after upsdrv |
69 | } |
70 | |
71 | start() { |
72 | ebegin "Starting upsd" |
73 | # clean up first |
74 | pkill -u root,nut -x ${bin} |
75 | sleep 1s |
76 | rm -f ${pidfile} |
77 | # now start up |
78 | start-stop-daemon --start --quiet --exec ${bin} |
79 | eend $? |
80 | } |
81 | |
82 | stop() { |
83 | ebegin "Stopping upsd" |
84 | start-stop-daemon --stop --quiet --pidfile ${pidfile} |
85 | eend $? |
86 | } |
87 | |
88 | reload() { |
89 | ebegin "Reloading upsd" |
90 | start-stop-daemon --stop --signal HUP --oknodo --quiet --pidfile ${pidfile} |
91 | eend $? |
92 | } |
93 | |
94 | |
95 | |
96 | 1.1 sys-power/nut/files/nut-2.2.2-init.d-upsdrv |
97 | |
98 | file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-power/nut/files/nut-2.2.2-init.d-upsdrv?rev=1.1&view=markup |
99 | plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-power/nut/files/nut-2.2.2-init.d-upsdrv?rev=1.1&content-type=text/plain |
100 | |
101 | Index: nut-2.2.2-init.d-upsdrv |
102 | =================================================================== |
103 | #!/sbin/runscript |
104 | # Copyright 1999-2004 Gentoo Foundation |
105 | # Distributed under the terms of the GNU General Public License v2 |
106 | # $Header: /var/cvsroot/gentoo-x86/sys-power/nut/files/nut-2.2.2-init.d-upsdrv,v 1.1 2008/06/25 02:29:04 robbat2 Exp $ |
107 | |
108 | opts="start stop stopall startall" |
109 | UPSNAME=${SVCNAME#*.} |
110 | msgtext="drivers" |
111 | [ "${UPSNAME}" == "${SVCNAME}" ] && UPSNAME='' |
112 | [ -n "$UPSNAME" ] && msgtext="driver for $UPSNAME" |
113 | |
114 | depend() { |
115 | before upsd |
116 | [ "${UPSNAME}" != '' ] && provide upsdrv |
117 | } |
118 | |
119 | start() { |
120 | _dostart "$UPSNAME" "$msgtext" |
121 | } |
122 | stop() { |
123 | _dostop "$UPSNAME" "$msgtext" |
124 | } |
125 | |
126 | startall() { |
127 | _dostart "" "$msgtext" |
128 | } |
129 | stopall() { |
130 | _dostop "" "$msgtext" |
131 | } |
132 | |
133 | _dostart() { |
134 | ebegin "Starting UPS $msgtext" |
135 | /usr/sbin/upsdrvctl start $UPSNAME |
136 | eend $? "Failed to start UPS $msgtext!" |
137 | } |
138 | |
139 | _dostop() { |
140 | # The pidfile names depend on the actual UPS name |
141 | # Not in our control at all |
142 | ebegin "Stopping UPS $msgtext" |
143 | /usr/sbin/upsdrvctl stop $UPSNAME |
144 | eend $? "Failed to stop UPS $msgtext!" |
145 | } |
146 | |
147 | |
148 | |
149 | -- |
150 | gentoo-commits@l.g.o mailing list |