Merge lp:~andreserl/maas/packaging_precise_rebase into lp:~maas-maintainers/maas/packaging.precise.sru
- packaging_precise_rebase
- Merge into packaging.precise.sru
Proposed by
Andres Rodriguez
Status: | Merged |
---|---|
Merged at revision: | 168 |
Proposed branch: | lp:~andreserl/maas/packaging_precise_rebase |
Merge into: | lp:~maas-maintainers/maas/packaging.precise.sru |
Diff against target: |
574 lines (+103/-136) 16 files modified
debian/changelog (+37/-4) debian/control (+11/-10) debian/maas-cluster-controller.config (+4/-4) debian/maas-cluster-controller.postinst (+4/-3) debian/maas-cluster-controller.postrm (+2/-9) debian/maas-cluster-controller.prerm (+0/-10) debian/maas-common.postinst (+6/-14) debian/maas-common.postrm (+1/-0) debian/maas-dhcp.postinst (+6/-13) debian/maas-dhcp.postrm (+5/-3) debian/maas-dns.postinst (+6/-7) debian/maas-dns.postrm (+3/-4) debian/maas-region-controller.config (+6/-6) debian/maas-region-controller.postinst (+11/-38) debian/maas-region-controller.postrm (+0/-4) debian/maas-region-controller.prerm (+1/-7) |
To merge this branch: | bzr merge lp:~andreserl/maas/packaging_precise_rebase |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Andres Rodriguez (community) | Approve | ||
Review via email: mp+154461@code.launchpad.net |
Commit message
Rebase against latest quantal.
Description of the change
To post a comment you must log in.
Revision history for this message
Andres Rodriguez (andreserl) : | # |
review:
Approve
Revision history for this message
Andres Rodriguez (andreserl) : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'debian/changelog' |
2 | --- debian/changelog 2013-03-08 23:24:32 +0000 |
3 | +++ debian/changelog 2013-03-20 18:27:20 +0000 |
4 | @@ -1,10 +1,10 @@ |
5 | -maas (1.2+bzr1372+dfsg-0ubuntu1~12.04.1) precise-proposed; urgency=low |
6 | +maas (1.2+bzr1372+dfsg-0ubuntu1) UNRELEASED; urgency=low |
7 | |
8 | * MAAS Stable Release Update (LP: #1109283). See changelog entry bellow. |
9 | * debian/maas-dhcp.maas-dhcp-server.upstart: leases file should be owned |
10 | by user/group 'dhcpd' instead of root. |
11 | * debian/control: Force dependency version for python-django to |
12 | - (>= 1.3.1-4ubuntu1.7). |
13 | + (>> 1.3.1-4ubuntu1.6). |
14 | * Continue to ship yui3 and raphael with MAAS. |
15 | - debian/patches/04_precise_no_yui_root.patch: Add. |
16 | - debian/control: Drop dependencies on yui3 and raphael. |
17 | @@ -12,9 +12,9 @@ |
18 | - debian/extras/jslibs: Ship JS libraries. |
19 | - debian/copyright: Update copyright to reflect libraries license. |
20 | |
21 | - -- Andres Rodriguez <andreserl@ubuntu.com> Fri, 08 Mar 2013 18:18:18 -0500 |
22 | + -- Andres Rodriguez <andreserl@ubuntu.com> Wed, 20 Mar 2013 14:01:48 -0400 |
23 | |
24 | -maas (1.2+bzr1372+dfsg-0ubuntu1) quantal-proposed; urgency=low |
25 | +maas (1.2+bzr1373+dfsg-0ubuntu1) quantal-proposed; urgency=low |
26 | |
27 | * MAAS Stable Release Update (LP: #1109283): |
28 | This SRU brings a new upstream release of MAAS that removes |
29 | @@ -23,6 +23,39 @@ |
30 | Board to proceed. More information can be found in: |
31 | https://lists.ubuntu.com/archives/ubuntu-devel-announce/2013-February/001012.html |
32 | |
33 | + [ Andres Rodriguez ] |
34 | + * debian/control: |
35 | + - Change Conflicts/Replaces for Breaks/Replaces. |
36 | + - Conflicts on tftpd-hpa and dnsmasq. |
37 | + - Do not pre-depends, but Depends on ${misc:Depends} for 'maas'. |
38 | + |
39 | + [ Steve Langasek ] |
40 | + * postinst scripts are never called with 'reconfigure' as the script |
41 | + argument. Remove references to this (mythical) invocation. |
42 | + * always call 'set -e' from maintainer scripts instead of passing 'sh -e' |
43 | + as the interpreter, so that scripts will behave correctly when run via |
44 | + 'sh -x'. |
45 | + * invoke-rc.d is never allowed to not exist - simplify scripts (and make |
46 | + them better policy-compliant) by invoking unconditionally. (The only |
47 | + possible exception is in the postrm, where it's *theoretically* possible |
48 | + for invoke-rc.d to be missing if the user has completely stripped |
49 | + down their system; that's a fairly unreasonable corner case, but we |
50 | + might as well be correct if it ever happens.) |
51 | + * db_get+db_set is a no-op; don't call db_set to push back a value we just |
52 | + got from db_get. |
53 | + * Omit superfluous calls to 'exit 0' at the end of each script. |
54 | + * Remove maas-cluster-controller prerm script, which called debconf for no |
55 | + reason. |
56 | + * Don't invoke debconf in the postrm script either, debhelper already does |
57 | + this for us. |
58 | + * Other miscellaneous maintainer script fixes |
59 | + * debian/maas-common.postinst: call adduser and addgroup unconditionally; |
60 | + the tools are already designed to DTRT, we don't need to check for the |
61 | + user/group existence before calling them nor should we worry about |
62 | + calling them only once on first install. |
63 | + * debian/maas-common.postrm: delete the maas group, not just the user, |
64 | + as the comment in the code implies we should do. |
65 | + |
66 | -- Andres Rodriguez <andreserl@ubuntu.com> Thu, 07 Mar 2013 14:22:35 -0500 |
67 | |
68 | maas (1.2+bzr1370+dfsg-0ubuntu1) raring; urgency=low |
69 | |
70 | === modified file 'debian/control' |
71 | --- debian/control 2013-03-08 23:21:23 +0000 |
72 | +++ debian/control 2013-03-20 18:27:20 +0000 |
73 | @@ -14,8 +14,7 @@ |
74 | |
75 | Package: maas |
76 | Architecture: all |
77 | -Pre-Depends: ${misc:Pre-Depends}, ${misc:Depends} |
78 | -Depends: maas-cluster-controller, maas-region-controller, python-django-maas |
79 | +Depends: ${misc:Depends}, maas-cluster-controller, maas-region-controller, python-django-maas |
80 | Description: Ubuntu MAAS Server |
81 | Ubuntu MAAS Server is the successor to Orchestra. It offers a |
82 | nice UI to provision your Ubuntu servers. Each physical server |
83 | @@ -32,7 +31,7 @@ |
84 | Package: maas-common |
85 | Architecture: all |
86 | Depends: ${misc:Depends}, ${python:Depends} |
87 | -Conflicts: maas ( <= 0.1+bzr1048+dfsg-0ubuntu1 ) |
88 | +Breaks: maas ( <= 0.1+bzr1048+dfsg-0ubuntu1 ) |
89 | Replaces: maas ( <= 0.1+bzr1048+dfsg-0ubuntu1 ) |
90 | Description: Ubuntu MAAS Server |
91 | Ubuntu MAAS Server is the successor to Orchestra. It offers a |
92 | @@ -56,7 +55,7 @@ |
93 | maas-common (= ${binary:Version}), |
94 | postgresql-9.1, |
95 | pwgen, |
96 | - python-django (>= 1.3.1-4ubuntu1.7), |
97 | + python-django (>> 1.3.1-4ubuntu1.6), |
98 | python-django-maas (= ${binary:Version}), |
99 | python-django-piston, |
100 | python-django-south, |
101 | @@ -68,7 +67,7 @@ |
102 | ${python:Depends} |
103 | Recommends: openssh-server |
104 | Suggests: maas-dns |
105 | -Conflicts: maas ( <= 0.1+bzr1048+dfsg-0ubuntu1 ) |
106 | +Breaks: maas ( <= 0.1+bzr1048+dfsg-0ubuntu1 ) |
107 | Replaces: maas ( <= 0.1+bzr1048+dfsg-0ubuntu1 ) |
108 | Description: Ubuntu MAAS Server |
109 | Ubuntu MAAS Server is the successor to Orchestra. It offers a |
110 | @@ -106,7 +105,7 @@ |
111 | python-zope.interface, |
112 | ${misc:Depends}, |
113 | ${python:Depends} |
114 | -Conflicts: python-django-maas ( <= 0.1+bzr1048+dfsg-0ubuntu1 ), maas-cluster-controller (<= 0.1+bzr1243+dfsg-0ubuntu3) |
115 | +Breaks: python-django-maas ( <= 0.1+bzr1048+dfsg-0ubuntu1 ), maas-cluster-controller (<= 0.1+bzr1243+dfsg-0ubuntu3) |
116 | Replaces: python-django-maas ( <= 0.1+bzr1048+dfsg-0ubuntu1 ), maas-cluster-controller (<= 0.1+bzr1243+dfsg-0ubuntu3) |
117 | Description: Ubuntu MAAS Server |
118 | Ubuntu MAAS Server is the successor to Orchestra. It offers a |
119 | @@ -144,7 +143,7 @@ |
120 | Section: python |
121 | Architecture: all |
122 | Depends: python-oauth, ${misc:Depends}, ${python:Depends} |
123 | -Conflicts: maas (<= 0.1+bzr971+dfsg-0ubuntu2 ) |
124 | +Breaks: maas (<= 0.1+bzr971+dfsg-0ubuntu2 ) |
125 | Replaces: maas (<= 0.1+bzr971+dfsg-0ubuntu2 ) |
126 | Description: Ubuntu MAAS API Client - (python files) |
127 | Ubuntu MAAS Server is the successor to Orchestra. It offers a |
128 | @@ -182,7 +181,8 @@ |
129 | ${misc:Depends}, |
130 | ${python:Depends} |
131 | Suggests: maas-dhcp (= ${binary:Version}) |
132 | -Conflicts: maas ( <= 0.1+bzr1048+dfsg-0ubuntu1 ), maas-region-controller ( <= 0.1+bzr1314+dfsg-0ubuntu1 ), tftpd-hpa |
133 | +Conflicts: tftpd-hpa |
134 | +Breaks: maas ( <= 0.1+bzr1048+dfsg-0ubuntu1 ), maas-region-controller ( <= 0.1+bzr1314+dfsg-0ubuntu1 ) |
135 | Replaces: maas ( <= 0.1+bzr1048+dfsg-0ubuntu1 ), maas-region-controller ( <= 0.1+bzr1314+dfsg-0ubuntu1 ) |
136 | Description: Ubuntu MAAS Cluster Controller |
137 | Ubuntu MAAS Server is the successor to Orchestra. It offers a |
138 | @@ -238,7 +238,7 @@ |
139 | Package: maas-dhcp |
140 | Architecture: all |
141 | Depends: isc-dhcp-server, ${misc:Depends} |
142 | -Conflicts: maas-dhcp (<= 0.1+bzr777+dfsg-0ubuntu1) |
143 | +Breaks: maas-dhcp (<= 0.1+bzr777+dfsg-0ubuntu1) |
144 | Replaces: maas-dhcp (<= 0.1+bzr777+dfsg-0ubuntu1) |
145 | Description: Ubuntu MAAS Server - DHCP Configuration (meta-package) |
146 | Ubuntu MAAS Server is the successor to Orchestra. It offers a |
147 | @@ -258,7 +258,8 @@ |
148 | maas-region-controller (= ${binary:Version}), |
149 | maas-dhcp (= ${binary:Version}), |
150 | ${misc:Depends} |
151 | -Conflicts: maas-dhcp (<= 0.1+bzr777+dfsg-0ubuntu1), dnsmasq |
152 | +Conflicts: dnsmasq |
153 | +Breaks: maas-dhcp (<= 0.1+bzr777+dfsg-0ubuntu1) |
154 | Replaces: maas-dhcp (<= 0.1+bzr777+dfsg-0ubuntu1) |
155 | Description: Ubuntu MAAS Server - DNS configuration (metapackage) |
156 | Ubuntu MAAS Server is the successor to Orchestra. It offers a |
157 | |
158 | === modified file 'debian/maas-cluster-controller.config' |
159 | --- debian/maas-cluster-controller.config 2012-11-13 20:40:35 +0000 |
160 | +++ debian/maas-cluster-controller.config 2013-03-20 18:27:20 +0000 |
161 | @@ -1,4 +1,6 @@ |
162 | -#!/bin/sh -e |
163 | +#!/bin/sh |
164 | + |
165 | +set -e |
166 | |
167 | . /usr/share/debconf/confmodule |
168 | db_version 2.0 |
169 | @@ -8,9 +10,7 @@ |
170 | if ([ "$1" = "configure" ] && [ -z "$2" ]); then |
171 | |
172 | db_get maas-cluster-controller/maas-url || true |
173 | - if [ -n "$RET" ]; then |
174 | - db_set maas-cluster-controller/maas-url "$RET" |
175 | - else |
176 | + if [ -z "$RET" ]; then |
177 | # Attempt to pre-populate if installing on the region controller. |
178 | if [ -e /etc/maas/maas_local_settings.py ]; then |
179 | url=$(awk '$1 == "DEFAULT_MAAS_URL" { split($0,array,"\"")} END{print array[2] }' /etc/maas/maas_local_settings.py) |
180 | |
181 | === modified file 'debian/maas-cluster-controller.postinst' |
182 | --- debian/maas-cluster-controller.postinst 2013-01-22 23:11:24 +0000 |
183 | +++ debian/maas-cluster-controller.postinst 2013-03-20 18:27:20 +0000 |
184 | @@ -1,4 +1,6 @@ |
185 | -#!/bin/sh -e |
186 | +#!/bin/sh |
187 | + |
188 | +set -e |
189 | |
190 | . /usr/share/debconf/confmodule |
191 | db_version 2.0 |
192 | @@ -72,7 +74,7 @@ |
193 | configure_maas_tgt |
194 | fi |
195 | |
196 | -if ([ "$1" = "configure" ] && [ -z "$2" ]) || [ "$1" = "reconfigure" ] || [ -n "$DEBCONF_RECONFIGURE" ]; then |
197 | +if ([ "$1" = "configure" ] && [ -z "$2" ]) || [ -n "$DEBCONF_RECONFIGURE" ]; then |
198 | |
199 | if dpkg --compare-versions "$2" lt 0.1+bzr1239+dfsg-0ubuntu1; then |
200 | create_log_dir |
201 | @@ -104,4 +106,3 @@ |
202 | fi |
203 | |
204 | #DEBHELPER# |
205 | -exit 0 |
206 | |
207 | === modified file 'debian/maas-cluster-controller.postrm' |
208 | --- debian/maas-cluster-controller.postrm 2012-11-20 22:13:28 +0000 |
209 | +++ debian/maas-cluster-controller.postrm 2013-03-20 18:27:20 +0000 |
210 | @@ -2,15 +2,12 @@ |
211 | |
212 | set -e |
213 | |
214 | -. /usr/share/debconf/confmodule |
215 | -db_version 2.0 |
216 | +#DEBHELPER# |
217 | |
218 | case "$1" in |
219 | purge) |
220 | # remove log directory |
221 | - if [ -d /var/log/maas ]; then |
222 | - rm -rf /var/log/maas |
223 | - fi |
224 | + rm -rf /var/log/maas |
225 | # remove var directory |
226 | rm -rf /var/lib/maas/celerybeat-cluster-schedule |
227 | DIR=/var/lib/maas |
228 | @@ -24,7 +21,3 @@ |
229 | fi |
230 | |
231 | esac |
232 | - |
233 | -#DEBHELPER# |
234 | - |
235 | -exit 0 |
236 | |
237 | === removed file 'debian/maas-cluster-controller.prerm' |
238 | --- debian/maas-cluster-controller.prerm 2012-10-08 17:16:30 +0000 |
239 | +++ debian/maas-cluster-controller.prerm 1970-01-01 00:00:00 +0000 |
240 | @@ -1,10 +0,0 @@ |
241 | -#!/bin/sh |
242 | - |
243 | -set -e |
244 | - |
245 | -. /usr/share/debconf/confmodule |
246 | -db_version 2.0 |
247 | - |
248 | -#DEBHELPER# |
249 | - |
250 | -exit 0 |
251 | |
252 | === modified file 'debian/maas-common.postinst' |
253 | --- debian/maas-common.postinst 2012-10-11 18:16:28 +0000 |
254 | +++ debian/maas-common.postinst 2013-03-20 18:27:20 +0000 |
255 | @@ -1,22 +1,14 @@ |
256 | -#!/bin/sh -e |
257 | +#!/bin/sh |
258 | + |
259 | +set -e |
260 | |
261 | add_user_group(){ |
262 | local user="maas" |
263 | local group="maas" |
264 | - if ! getent group "$group" >/dev/null; then |
265 | - addgroup --quiet --system "$group" || true |
266 | - fi |
267 | - if ! getent passwd "$user" > /dev/null 2>&1; then |
268 | - adduser --quiet \ |
269 | - --system \ |
270 | - --group \ |
271 | - --no-create-home \ |
272 | - "$user" || true |
273 | - fi |
274 | + addgroup --quiet --system "$group" || true |
275 | + adduser --quiet --system --group --no-create-home "$user" || true |
276 | } |
277 | |
278 | -if [ "$1" = "configure" ]; then |
279 | - add_user_group |
280 | -fi |
281 | +add_user_group |
282 | |
283 | #DEBHELPER# |
284 | |
285 | === modified file 'debian/maas-common.postrm' |
286 | --- debian/maas-common.postrm 2012-10-11 18:16:28 +0000 |
287 | +++ debian/maas-common.postrm 2013-03-20 18:27:20 +0000 |
288 | @@ -7,6 +7,7 @@ |
289 | # Deleting user/group |
290 | if getent passwd maas >/dev/null; then |
291 | deluser maas || true |
292 | + delgroup maas || true |
293 | fi |
294 | esac |
295 | |
296 | |
297 | === modified file 'debian/maas-dhcp.postinst' |
298 | --- debian/maas-dhcp.postinst 2012-10-02 18:42:28 +0000 |
299 | +++ debian/maas-dhcp.postinst 2013-03-20 18:27:20 +0000 |
300 | @@ -1,22 +1,15 @@ |
301 | -#!/bin/sh -e |
302 | - |
303 | -. /usr/share/debconf/confmodule |
304 | -db_version 2.0 |
305 | - |
306 | -stop_isc_dhcp_server(){ |
307 | - invoke-rc.d isc-dhcp-server stop |
308 | -} |
309 | - |
310 | +#!/bin/sh |
311 | + |
312 | +set -e |
313 | |
314 | if [ "$1" = "configure" ]; then |
315 | - stop_isc_dhcp_server |
316 | + invoke-rc.d isc-dhcp-server stop |
317 | |
318 | dhcpd_prof="/etc/apparmor.d/usr.sbin.dhcpd" |
319 | - if [ -f "${dhcpd_prof}" ] && |
320 | - command -v apparmor_parser >/dev/null 2>&1; then |
321 | + if [ -f "${dhcpd_prof}" ] && command -v apparmor_parser >/dev/null 2>&1 |
322 | + then |
323 | apparmor_parser --replace --write-cache --skip-read-cache "${dhcpd_prof}" |
324 | fi |
325 | fi |
326 | |
327 | #DEBHELPER# |
328 | -exit 0 |
329 | |
330 | === modified file 'debian/maas-dhcp.postrm' |
331 | --- debian/maas-dhcp.postrm 2012-09-14 18:06:57 +0000 |
332 | +++ debian/maas-dhcp.postrm 2013-03-20 18:27:20 +0000 |
333 | @@ -1,6 +1,8 @@ |
334 | -#!/bin/sh -e |
335 | - |
336 | -if [ "$1" = "remove" -o "$1" = "purge" ]; then |
337 | +#!/bin/sh |
338 | + |
339 | +set -e |
340 | + |
341 | +if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then |
342 | dhcpd_prof="/etc/apparmor.d/usr.sbin.dhcpd" |
343 | if [ -f "${dhcpd_prof}" ] && |
344 | command -v apparmor_parser >/dev/null 2>&1; then |
345 | |
346 | === modified file 'debian/maas-dns.postinst' |
347 | --- debian/maas-dns.postinst 2013-01-22 23:11:24 +0000 |
348 | +++ debian/maas-dns.postinst 2013-03-20 18:27:20 +0000 |
349 | @@ -1,6 +1,8 @@ |
350 | -#!/bin/sh -e |
351 | - |
352 | -if ([ "$1" = "configure" ] && [ -z "$2" ]) || [ "$1" = "reconfigure" ] || [ -n "$DEBCONF_RECONFIGURE" ]; then |
353 | +#!/bin/sh |
354 | + |
355 | +set -e |
356 | + |
357 | +if ([ "$1" = "configure" ] && [ -z "$2" ]) || [ -n "$DEBCONF_RECONFIGURE" ]; then |
358 | # If /etc/bind/maas is empty, set_up_dns. |
359 | if [ ! "$(ls -A /etc/bind/maas)" ]; then |
360 | maas set_up_dns |
361 | @@ -28,10 +30,7 @@ |
362 | |
363 | maas write_dns_config |
364 | |
365 | - if [ -x /usr/sbin/invoke-rc.d ]; then |
366 | - invoke-rc.d bind9 restart || true |
367 | - fi |
368 | + invoke-rc.d bind9 restart || true |
369 | fi |
370 | |
371 | #DEBHELPER# |
372 | -exit 0 |
373 | |
374 | === modified file 'debian/maas-dns.postrm' |
375 | --- debian/maas-dns.postrm 2012-08-10 23:50:38 +0000 |
376 | +++ debian/maas-dns.postrm 2013-03-20 18:27:20 +0000 |
377 | @@ -1,4 +1,6 @@ |
378 | -#!/bin/sh -e |
379 | +#!/bin/sh |
380 | + |
381 | +set -e |
382 | |
383 | if [ "$1" = "remove" ]; then |
384 | if [ -f /etc/bind/named.conf.local ]; then |
385 | @@ -19,6 +21,3 @@ |
386 | fi |
387 | |
388 | #DEBHELPER# |
389 | - |
390 | -exit 0 |
391 | - |
392 | |
393 | === modified file 'debian/maas-region-controller.config' |
394 | --- debian/maas-region-controller.config 2012-10-11 18:50:41 +0000 |
395 | +++ debian/maas-region-controller.config 2013-03-20 18:27:20 +0000 |
396 | @@ -1,4 +1,6 @@ |
397 | -#!/bin/sh -e |
398 | +#!/bin/sh |
399 | + |
400 | +set -e |
401 | |
402 | . /usr/share/debconf/confmodule |
403 | db_version 2.0 |
404 | @@ -21,7 +23,7 @@ |
405 | . /usr/share/dbconfig-common/dpkg/config.pgsql |
406 | fi |
407 | |
408 | -if ([ "$1" = "configure" ] && [ -z "$2" ]); then |
409 | +if [ "$1" = "configure" ] && [ -z "$2" ]; then |
410 | # Hide maas/dbconfig-install question by setting default. |
411 | set_question maas-region-controller/dbconfig-install true |
412 | set_question maas-region-controller/pgsql/app-pass "" |
413 | @@ -32,11 +34,9 @@ |
414 | |
415 | dbc_go maas-region-controller $@ |
416 | |
417 | -elif [ "$1" = "reconfigure" ] || [ -n "$DEBCONF_RECONFIGURE" ]; then |
418 | +elif [ -n "$DEBCONF_RECONFIGURE" ]; then |
419 | db_get maas/default-maas-url || true |
420 | - if [ -n "$RET" ]; then |
421 | - db_set maas/default-maas-url "$RET" |
422 | - else |
423 | + if [ -z "$RET" ]; then |
424 | ipaddr=$(awk '$1 == "DEFAULT_MAAS_URL" { split($0,array,"/")} END{print array[3] }' /etc/maas/maas_local_settings.py) |
425 | db_set maas/default-maas-url "$ipaddr" |
426 | fi |
427 | |
428 | === modified file 'debian/maas-region-controller.postinst' |
429 | --- debian/maas-region-controller.postinst 2012-11-20 22:13:28 +0000 |
430 | +++ debian/maas-region-controller.postinst 2013-03-20 18:27:20 +0000 |
431 | @@ -1,4 +1,6 @@ |
432 | -#!/bin/sh -e |
433 | +#!/bin/sh |
434 | + |
435 | +set -e |
436 | |
437 | . /usr/share/debconf/confmodule |
438 | db_version 2.0 |
439 | @@ -13,36 +15,16 @@ |
440 | maas migrate metadataserver --noinput |
441 | } |
442 | |
443 | -restart_apache2(){ |
444 | - if [ -x /usr/sbin/invoke-rc.d ]; then |
445 | - invoke-rc.d apache2 restart || true |
446 | - else |
447 | - /etc/init.d/apache2 restart || true |
448 | - fi |
449 | -} |
450 | - |
451 | restart_rabbitmq(){ |
452 | - if [ -x /usr/sbin/invoke-rc.d ]; then |
453 | - invoke-rc.d rabbitmq-server restart || true |
454 | - else |
455 | - /etc/init.d/rabbitmq-server restart || true |
456 | - fi |
457 | + invoke-rc.d rabbitmq-server restart || true |
458 | } |
459 | |
460 | restart_postgresql(){ |
461 | - if [ -x /usr/sbin/invoke-rc.d ]; then |
462 | - invoke-rc.d --force postgresql restart || true |
463 | - else |
464 | - /etc/init.d/postgresql restart || true |
465 | - fi |
466 | + invoke-rc.d --force postgresql restart || true |
467 | } |
468 | |
469 | restart_squid_deb_proxy() { |
470 | - if [ -x /usr/sbin/invoke-rc.d ]; then |
471 | - invoke-rc.d squid-deb-proxy restart || true |
472 | - else |
473 | - /etc/init.d/squid-deb-proxy restart || true |
474 | - fi |
475 | + invoke-rc.d squid-deb-proxy restart || true |
476 | } |
477 | |
478 | configure_maas_txlongpoll_rabbitmq_user() { |
479 | @@ -191,17 +173,13 @@ |
480 | mkdir -p /var/log/maas/rsyslog |
481 | chown -R syslog:syslog /var/log/maas/rsyslog |
482 | # Make sure rsyslog reads our config |
483 | - if [ -x /usr/sbin/invoke-rc.d ]; then |
484 | - invoke-rc.d rsyslog restart |
485 | - fi |
486 | + invoke-rc.d rsyslog restart |
487 | |
488 | ######################################################### |
489 | ################### Squid-deb-proxy #################### |
490 | ######################################################### |
491 | # Make sure squid-deb-proxy reads our config (99-maas) |
492 | - if [ -x /usr/sbin/invoke-rc.d ]; then |
493 | - invoke-rc.d squid-deb-proxy restart |
494 | - fi |
495 | + invoke-rc.d squid-deb-proxy restart |
496 | |
497 | ######################################################### |
498 | ########## Configure longpoll rabbitmq config ########### |
499 | @@ -239,11 +217,10 @@ |
500 | db_input high maas/installation-note || true |
501 | db_go |
502 | |
503 | -elif [ "$1" = "reconfigure" ] || [ -n "$DEBCONF_RECONFIGURE" ]; then |
504 | +elif [ -n "$DEBCONF_RECONFIGURE" ]; then |
505 | # Set the IP address of the interface with default route |
506 | db_get maas/default-maas-url |
507 | ipaddr="$RET" |
508 | - db_set maas/default-maas-url "$ipaddr" |
509 | if [ -n "$ipaddr" ]; then |
510 | configure_maas_default_url "$ipaddr" |
511 | configure_maas_squid_deb_proxy "$ipaddr" |
512 | @@ -252,9 +229,7 @@ |
513 | |
514 | elif [ "$1" = "configure" ] && dpkg --compare-versions "$2" gt 0.1+bzr266+dfsg-0ubuntu1; then |
515 | # If upgrading to any later package version, then upgrade db. |
516 | - if [ -x /usr/sbin/invoke-rc.d ]; then |
517 | - invoke-rc.d apache2 stop || true |
518 | - fi |
519 | + invoke-rc.d apache2 stop || true |
520 | |
521 | # make sure postgresql is running |
522 | restart_postgresql |
523 | @@ -284,12 +259,10 @@ |
524 | |
525 | fi |
526 | |
527 | -restart_apache2 |
528 | +invoke-rc.d apache2 restart || true |
529 | |
530 | restart_squid_deb_proxy |
531 | |
532 | db_stop |
533 | |
534 | #DEBHELPER# |
535 | - |
536 | -exit 0 |
537 | |
538 | === modified file 'debian/maas-region-controller.postrm' |
539 | --- debian/maas-region-controller.postrm 2012-11-20 22:13:28 +0000 |
540 | +++ debian/maas-region-controller.postrm 2013-03-20 18:27:20 +0000 |
541 | @@ -22,8 +22,6 @@ |
542 | # Restarting apache2 |
543 | if [ -x /usr/sbin/invoke-rc.d ]; then |
544 | invoke-rc.d apache2 restart || true |
545 | - else |
546 | - /etc/init.d/apache2 restart || true |
547 | fi |
548 | |
549 | # Delete symlink |
550 | @@ -48,5 +46,3 @@ |
551 | #DEBHELPER# |
552 | |
553 | db_stop |
554 | - |
555 | -exit 0 |
556 | |
557 | === modified file 'debian/maas-region-controller.prerm' |
558 | --- debian/maas-region-controller.prerm 2012-09-28 02:40:23 +0000 |
559 | +++ debian/maas-region-controller.prerm 2013-03-20 18:27:20 +0000 |
560 | @@ -6,13 +6,7 @@ |
561 | |
562 | #DEBHELPER# |
563 | |
564 | -if [ -x /usr/sbin/invoke-rc.d ]; then |
565 | - invoke-rc.d apache2 stop || true |
566 | -else |
567 | - /etc/init.d/apache2 stop || true |
568 | -fi |
569 | +invoke-rc.d apache2 stop || true |
570 | |
571 | . /usr/share/dbconfig-common/dpkg/prerm.pgsql |
572 | dbc_go maas-region-controller $@ |
573 | - |
574 | -exit 0 |