Merge lp:~andreserl/maas/packaging_quantal_slangasek_backport into lp:~maas-maintainers/maas/packaging.quantal
- packaging_quantal_slangasek_backport
- Merge into packaging.quantal
Proposed by
Andres Rodriguez
Status: | Merged |
---|---|
Approved by: | Andres Rodriguez |
Approved revision: | no longer in the source branch. |
Merged at revision: | 166 |
Proposed branch: | lp:~andreserl/maas/packaging_quantal_slangasek_backport |
Merge into: | lp:~maas-maintainers/maas/packaging.quantal |
Diff against target: |
461 lines (+83/-123) 15 files modified
debian/changelog (+28/-1) 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_quantal_slangasek_backport |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Andres Rodriguez (community) | Approve | ||
Review via email: mp+154450@code.launchpad.net |
Commit message
Backport slangasek fixes to packaging (rev 169)
Description of the change
To post a comment you must log in.
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:09:22 +0000 | |||
3 | +++ debian/changelog 2013-03-20 17:45:26 +0000 | |||
4 | @@ -1,4 +1,4 @@ | |||
6 | 1 | maas (1.2+bzr1372+dfsg-0ubuntu1) quantal-proposed; urgency=low | 1 | maas (1.2+bzr1373+dfsg-0ubuntu1) UNRELEASED; urgency=low |
7 | 2 | 2 | ||
8 | 3 | * MAAS Stable Release Update (LP: #1109283): | 3 | * MAAS Stable Release Update (LP: #1109283): |
9 | 4 | This SRU brings a new upstream release of MAAS that removes | 4 | This SRU brings a new upstream release of MAAS that removes |
10 | @@ -7,6 +7,33 @@ | |||
11 | 7 | Board to proceed. More information can be found in: | 7 | Board to proceed. More information can be found in: |
12 | 8 | https://lists.ubuntu.com/archives/ubuntu-devel-announce/2013-February/001012.html | 8 | https://lists.ubuntu.com/archives/ubuntu-devel-announce/2013-February/001012.html |
13 | 9 | 9 | ||
14 | 10 | [ Steve Langasek ] | ||
15 | 11 | * postinst scripts are never called with 'reconfigure' as the script | ||
16 | 12 | argument. Remove references to this (mythical) invocation. | ||
17 | 13 | * always call 'set -e' from maintainer scripts instead of passing 'sh -e' | ||
18 | 14 | as the interpreter, so that scripts will behave correctly when run via | ||
19 | 15 | 'sh -x'. | ||
20 | 16 | * invoke-rc.d is never allowed to not exist - simplify scripts (and make | ||
21 | 17 | them better policy-compliant) by invoking unconditionally. (The only | ||
22 | 18 | possible exception is in the postrm, where it's *theoretically* possible | ||
23 | 19 | for invoke-rc.d to be missing if the user has completely stripped | ||
24 | 20 | down their system; that's a fairly unreasonable corner case, but we | ||
25 | 21 | might as well be correct if it ever happens.) | ||
26 | 22 | * db_get+db_set is a no-op; don't call db_set to push back a value we just | ||
27 | 23 | got from db_get. | ||
28 | 24 | * Omit superfluous calls to 'exit 0' at the end of each script. | ||
29 | 25 | * Remove maas-cluster-controller prerm script, which called debconf for no | ||
30 | 26 | reason. | ||
31 | 27 | * Don't invoke debconf in the postrm script either, debhelper already does | ||
32 | 28 | this for us. | ||
33 | 29 | * Other miscellaneous maintainer script fixes | ||
34 | 30 | * debian/maas-common.postinst: call adduser and addgroup unconditionally; | ||
35 | 31 | the tools are already designed to DTRT, we don't need to check for the | ||
36 | 32 | user/group existence before calling them nor should we worry about | ||
37 | 33 | calling them only once on first install. | ||
38 | 34 | * debian/maas-common.postrm: delete the maas group, not just the user, | ||
39 | 35 | as the comment in the code implies we should do. | ||
40 | 36 | |||
41 | 10 | -- Andres Rodriguez <andreserl@ubuntu.com> Thu, 07 Mar 2013 14:22:35 -0500 | 37 | -- Andres Rodriguez <andreserl@ubuntu.com> Thu, 07 Mar 2013 14:22:35 -0500 |
42 | 11 | 38 | ||
43 | 12 | maas (1.2+bzr1370+dfsg-0ubuntu1) raring; urgency=low | 39 | maas (1.2+bzr1370+dfsg-0ubuntu1) raring; urgency=low |
44 | 13 | 40 | ||
45 | === modified file 'debian/maas-cluster-controller.config' | |||
46 | --- debian/maas-cluster-controller.config 2012-11-13 20:40:35 +0000 | |||
47 | +++ debian/maas-cluster-controller.config 2013-03-20 17:45:26 +0000 | |||
48 | @@ -1,4 +1,6 @@ | |||
50 | 1 | #!/bin/sh -e | 1 | #!/bin/sh |
51 | 2 | |||
52 | 3 | set -e | ||
53 | 2 | 4 | ||
54 | 3 | . /usr/share/debconf/confmodule | 5 | . /usr/share/debconf/confmodule |
55 | 4 | db_version 2.0 | 6 | db_version 2.0 |
56 | @@ -8,9 +10,7 @@ | |||
57 | 8 | if ([ "$1" = "configure" ] && [ -z "$2" ]); then | 10 | if ([ "$1" = "configure" ] && [ -z "$2" ]); then |
58 | 9 | 11 | ||
59 | 10 | db_get maas-cluster-controller/maas-url || true | 12 | db_get maas-cluster-controller/maas-url || true |
63 | 11 | if [ -n "$RET" ]; then | 13 | if [ -z "$RET" ]; then |
61 | 12 | db_set maas-cluster-controller/maas-url "$RET" | ||
62 | 13 | else | ||
64 | 14 | # Attempt to pre-populate if installing on the region controller. | 14 | # Attempt to pre-populate if installing on the region controller. |
65 | 15 | if [ -e /etc/maas/maas_local_settings.py ]; then | 15 | if [ -e /etc/maas/maas_local_settings.py ]; then |
66 | 16 | url=$(awk '$1 == "DEFAULT_MAAS_URL" { split($0,array,"\"")} END{print array[2] }' /etc/maas/maas_local_settings.py) | 16 | url=$(awk '$1 == "DEFAULT_MAAS_URL" { split($0,array,"\"")} END{print array[2] }' /etc/maas/maas_local_settings.py) |
67 | 17 | 17 | ||
68 | === modified file 'debian/maas-cluster-controller.postinst' | |||
69 | --- debian/maas-cluster-controller.postinst 2012-12-13 11:00:54 +0000 | |||
70 | +++ debian/maas-cluster-controller.postinst 2013-03-20 17:45:26 +0000 | |||
71 | @@ -1,4 +1,6 @@ | |||
73 | 1 | #!/bin/sh -e | 1 | #!/bin/sh |
74 | 2 | |||
75 | 3 | set -e | ||
76 | 2 | 4 | ||
77 | 3 | . /usr/share/debconf/confmodule | 5 | . /usr/share/debconf/confmodule |
78 | 4 | db_version 2.0 | 6 | db_version 2.0 |
79 | @@ -72,7 +74,7 @@ | |||
80 | 72 | configure_maas_tgt | 74 | configure_maas_tgt |
81 | 73 | fi | 75 | fi |
82 | 74 | 76 | ||
84 | 75 | if ([ "$1" = "configure" ] && [ -z "$2" ]) || [ "$1" = "reconfigure" ] || [ -n "$DEBCONF_RECONFIGURE" ]; then | 77 | if ([ "$1" = "configure" ] && [ -z "$2" ]) || [ -n "$DEBCONF_RECONFIGURE" ]; then |
85 | 76 | 78 | ||
86 | 77 | if dpkg --compare-versions "$2" lt 0.1+bzr1239+dfsg-0ubuntu1; then | 79 | if dpkg --compare-versions "$2" lt 0.1+bzr1239+dfsg-0ubuntu1; then |
87 | 78 | create_log_dir | 80 | create_log_dir |
88 | @@ -104,4 +106,3 @@ | |||
89 | 104 | fi | 106 | fi |
90 | 105 | 107 | ||
91 | 106 | #DEBHELPER# | 108 | #DEBHELPER# |
92 | 107 | exit 0 | ||
93 | 108 | 109 | ||
94 | === modified file 'debian/maas-cluster-controller.postrm' | |||
95 | --- debian/maas-cluster-controller.postrm 2012-11-20 22:13:28 +0000 | |||
96 | +++ debian/maas-cluster-controller.postrm 2013-03-20 17:45:26 +0000 | |||
97 | @@ -2,15 +2,12 @@ | |||
98 | 2 | 2 | ||
99 | 3 | set -e | 3 | set -e |
100 | 4 | 4 | ||
103 | 5 | . /usr/share/debconf/confmodule | 5 | #DEBHELPER# |
102 | 6 | db_version 2.0 | ||
104 | 7 | 6 | ||
105 | 8 | case "$1" in | 7 | case "$1" in |
106 | 9 | purge) | 8 | purge) |
107 | 10 | # remove log directory | 9 | # remove log directory |
111 | 11 | if [ -d /var/log/maas ]; then | 10 | rm -rf /var/log/maas |
109 | 12 | rm -rf /var/log/maas | ||
110 | 13 | fi | ||
112 | 14 | # remove var directory | 11 | # remove var directory |
113 | 15 | rm -rf /var/lib/maas/celerybeat-cluster-schedule | 12 | rm -rf /var/lib/maas/celerybeat-cluster-schedule |
114 | 16 | DIR=/var/lib/maas | 13 | DIR=/var/lib/maas |
115 | @@ -24,7 +21,3 @@ | |||
116 | 24 | fi | 21 | fi |
117 | 25 | 22 | ||
118 | 26 | esac | 23 | esac |
119 | 27 | |||
120 | 28 | #DEBHELPER# | ||
121 | 29 | |||
122 | 30 | exit 0 | ||
123 | 31 | 24 | ||
124 | === removed file 'debian/maas-cluster-controller.prerm' | |||
125 | --- debian/maas-cluster-controller.prerm 2012-10-08 17:16:30 +0000 | |||
126 | +++ debian/maas-cluster-controller.prerm 1970-01-01 00:00:00 +0000 | |||
127 | @@ -1,10 +0,0 @@ | |||
128 | 1 | #!/bin/sh | ||
129 | 2 | |||
130 | 3 | set -e | ||
131 | 4 | |||
132 | 5 | . /usr/share/debconf/confmodule | ||
133 | 6 | db_version 2.0 | ||
134 | 7 | |||
135 | 8 | #DEBHELPER# | ||
136 | 9 | |||
137 | 10 | exit 0 | ||
138 | 11 | 0 | ||
139 | === modified file 'debian/maas-common.postinst' | |||
140 | --- debian/maas-common.postinst 2012-10-11 18:16:28 +0000 | |||
141 | +++ debian/maas-common.postinst 2013-03-20 17:45:26 +0000 | |||
142 | @@ -1,22 +1,14 @@ | |||
144 | 1 | #!/bin/sh -e | 1 | #!/bin/sh |
145 | 2 | |||
146 | 3 | set -e | ||
147 | 2 | 4 | ||
148 | 3 | add_user_group(){ | 5 | add_user_group(){ |
149 | 4 | local user="maas" | 6 | local user="maas" |
150 | 5 | local group="maas" | 7 | local group="maas" |
161 | 6 | if ! getent group "$group" >/dev/null; then | 8 | addgroup --quiet --system "$group" || true |
162 | 7 | addgroup --quiet --system "$group" || true | 9 | adduser --quiet --system --group --no-create-home "$user" || true |
153 | 8 | fi | ||
154 | 9 | if ! getent passwd "$user" > /dev/null 2>&1; then | ||
155 | 10 | adduser --quiet \ | ||
156 | 11 | --system \ | ||
157 | 12 | --group \ | ||
158 | 13 | --no-create-home \ | ||
159 | 14 | "$user" || true | ||
160 | 15 | fi | ||
163 | 16 | } | 10 | } |
164 | 17 | 11 | ||
168 | 18 | if [ "$1" = "configure" ]; then | 12 | add_user_group |
166 | 19 | add_user_group | ||
167 | 20 | fi | ||
169 | 21 | 13 | ||
170 | 22 | #DEBHELPER# | 14 | #DEBHELPER# |
171 | 23 | 15 | ||
172 | === modified file 'debian/maas-common.postrm' | |||
173 | --- debian/maas-common.postrm 2012-10-11 18:16:28 +0000 | |||
174 | +++ debian/maas-common.postrm 2013-03-20 17:45:26 +0000 | |||
175 | @@ -7,6 +7,7 @@ | |||
176 | 7 | # Deleting user/group | 7 | # Deleting user/group |
177 | 8 | if getent passwd maas >/dev/null; then | 8 | if getent passwd maas >/dev/null; then |
178 | 9 | deluser maas || true | 9 | deluser maas || true |
179 | 10 | delgroup maas || true | ||
180 | 10 | fi | 11 | fi |
181 | 11 | esac | 12 | esac |
182 | 12 | 13 | ||
183 | 13 | 14 | ||
184 | === modified file 'debian/maas-dhcp.postinst' | |||
185 | --- debian/maas-dhcp.postinst 2012-10-02 18:42:28 +0000 | |||
186 | +++ debian/maas-dhcp.postinst 2013-03-20 17:45:26 +0000 | |||
187 | @@ -1,22 +1,15 @@ | |||
197 | 1 | #!/bin/sh -e | 1 | #!/bin/sh |
198 | 2 | 2 | ||
199 | 3 | . /usr/share/debconf/confmodule | 3 | set -e |
191 | 4 | db_version 2.0 | ||
192 | 5 | |||
193 | 6 | stop_isc_dhcp_server(){ | ||
194 | 7 | invoke-rc.d isc-dhcp-server stop | ||
195 | 8 | } | ||
196 | 9 | |||
200 | 10 | 4 | ||
201 | 11 | if [ "$1" = "configure" ]; then | 5 | if [ "$1" = "configure" ]; then |
203 | 12 | stop_isc_dhcp_server | 6 | invoke-rc.d isc-dhcp-server stop |
204 | 13 | 7 | ||
205 | 14 | dhcpd_prof="/etc/apparmor.d/usr.sbin.dhcpd" | 8 | dhcpd_prof="/etc/apparmor.d/usr.sbin.dhcpd" |
208 | 15 | if [ -f "${dhcpd_prof}" ] && | 9 | if [ -f "${dhcpd_prof}" ] && command -v apparmor_parser >/dev/null 2>&1 |
209 | 16 | command -v apparmor_parser >/dev/null 2>&1; then | 10 | then |
210 | 17 | apparmor_parser --replace --write-cache --skip-read-cache "${dhcpd_prof}" | 11 | apparmor_parser --replace --write-cache --skip-read-cache "${dhcpd_prof}" |
211 | 18 | fi | 12 | fi |
212 | 19 | fi | 13 | fi |
213 | 20 | 14 | ||
214 | 21 | #DEBHELPER# | 15 | #DEBHELPER# |
215 | 22 | exit 0 | ||
216 | 23 | 16 | ||
217 | === modified file 'debian/maas-dhcp.postrm' | |||
218 | --- debian/maas-dhcp.postrm 2012-09-14 18:06:57 +0000 | |||
219 | +++ debian/maas-dhcp.postrm 2013-03-20 17:45:26 +0000 | |||
220 | @@ -1,6 +1,8 @@ | |||
224 | 1 | #!/bin/sh -e | 1 | #!/bin/sh |
225 | 2 | 2 | ||
226 | 3 | if [ "$1" = "remove" -o "$1" = "purge" ]; then | 3 | set -e |
227 | 4 | |||
228 | 5 | if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then | ||
229 | 4 | dhcpd_prof="/etc/apparmor.d/usr.sbin.dhcpd" | 6 | dhcpd_prof="/etc/apparmor.d/usr.sbin.dhcpd" |
230 | 5 | if [ -f "${dhcpd_prof}" ] && | 7 | if [ -f "${dhcpd_prof}" ] && |
231 | 6 | command -v apparmor_parser >/dev/null 2>&1; then | 8 | command -v apparmor_parser >/dev/null 2>&1; then |
232 | 7 | 9 | ||
233 | === modified file 'debian/maas-dns.postinst' | |||
234 | --- debian/maas-dns.postinst 2012-12-04 16:16:39 +0000 | |||
235 | +++ debian/maas-dns.postinst 2013-03-20 17:45:26 +0000 | |||
236 | @@ -1,6 +1,8 @@ | |||
240 | 1 | #!/bin/sh -e | 1 | #!/bin/sh |
241 | 2 | 2 | ||
242 | 3 | if ([ "$1" = "configure" ] && [ -z "$2" ]) || [ "$1" = "reconfigure" ] || [ -n "$DEBCONF_RECONFIGURE" ]; then | 3 | set -e |
243 | 4 | |||
244 | 5 | if ([ "$1" = "configure" ] && [ -z "$2" ]) || [ -n "$DEBCONF_RECONFIGURE" ]; then | ||
245 | 4 | # If /etc/bind/maas is empty, set_up_dns. | 6 | # If /etc/bind/maas is empty, set_up_dns. |
246 | 5 | if [ ! "$(ls -A /etc/bind/maas)" ]; then | 7 | if [ ! "$(ls -A /etc/bind/maas)" ]; then |
247 | 6 | maas set_up_dns | 8 | maas set_up_dns |
248 | @@ -28,10 +30,7 @@ | |||
249 | 28 | 30 | ||
250 | 29 | maas write_dns_config | 31 | maas write_dns_config |
251 | 30 | 32 | ||
255 | 31 | if [ -x /usr/sbin/invoke-rc.d ]; then | 33 | invoke-rc.d bind9 restart || true |
253 | 32 | invoke-rc.d bind9 restart || true | ||
254 | 33 | fi | ||
256 | 34 | fi | 34 | fi |
257 | 35 | 35 | ||
258 | 36 | #DEBHELPER# | 36 | #DEBHELPER# |
259 | 37 | exit 0 | ||
260 | 38 | 37 | ||
261 | === modified file 'debian/maas-dns.postrm' | |||
262 | --- debian/maas-dns.postrm 2012-08-10 23:50:38 +0000 | |||
263 | +++ debian/maas-dns.postrm 2013-03-20 17:45:26 +0000 | |||
264 | @@ -1,4 +1,6 @@ | |||
266 | 1 | #!/bin/sh -e | 1 | #!/bin/sh |
267 | 2 | |||
268 | 3 | set -e | ||
269 | 2 | 4 | ||
270 | 3 | if [ "$1" = "remove" ]; then | 5 | if [ "$1" = "remove" ]; then |
271 | 4 | if [ -f /etc/bind/named.conf.local ]; then | 6 | if [ -f /etc/bind/named.conf.local ]; then |
272 | @@ -19,6 +21,3 @@ | |||
273 | 19 | fi | 21 | fi |
274 | 20 | 22 | ||
275 | 21 | #DEBHELPER# | 23 | #DEBHELPER# |
276 | 22 | |||
277 | 23 | exit 0 | ||
278 | 24 | |||
279 | 25 | 24 | ||
280 | === modified file 'debian/maas-region-controller.config' | |||
281 | --- debian/maas-region-controller.config 2012-10-11 18:50:41 +0000 | |||
282 | +++ debian/maas-region-controller.config 2013-03-20 17:45:26 +0000 | |||
283 | @@ -1,4 +1,6 @@ | |||
285 | 1 | #!/bin/sh -e | 1 | #!/bin/sh |
286 | 2 | |||
287 | 3 | set -e | ||
288 | 2 | 4 | ||
289 | 3 | . /usr/share/debconf/confmodule | 5 | . /usr/share/debconf/confmodule |
290 | 4 | db_version 2.0 | 6 | db_version 2.0 |
291 | @@ -21,7 +23,7 @@ | |||
292 | 21 | . /usr/share/dbconfig-common/dpkg/config.pgsql | 23 | . /usr/share/dbconfig-common/dpkg/config.pgsql |
293 | 22 | fi | 24 | fi |
294 | 23 | 25 | ||
296 | 24 | if ([ "$1" = "configure" ] && [ -z "$2" ]); then | 26 | if [ "$1" = "configure" ] && [ -z "$2" ]; then |
297 | 25 | # Hide maas/dbconfig-install question by setting default. | 27 | # Hide maas/dbconfig-install question by setting default. |
298 | 26 | set_question maas-region-controller/dbconfig-install true | 28 | set_question maas-region-controller/dbconfig-install true |
299 | 27 | set_question maas-region-controller/pgsql/app-pass "" | 29 | set_question maas-region-controller/pgsql/app-pass "" |
300 | @@ -32,11 +34,9 @@ | |||
301 | 32 | 34 | ||
302 | 33 | dbc_go maas-region-controller $@ | 35 | dbc_go maas-region-controller $@ |
303 | 34 | 36 | ||
305 | 35 | elif [ "$1" = "reconfigure" ] || [ -n "$DEBCONF_RECONFIGURE" ]; then | 37 | elif [ -n "$DEBCONF_RECONFIGURE" ]; then |
306 | 36 | db_get maas/default-maas-url || true | 38 | db_get maas/default-maas-url || true |
310 | 37 | if [ -n "$RET" ]; then | 39 | if [ -z "$RET" ]; then |
308 | 38 | db_set maas/default-maas-url "$RET" | ||
309 | 39 | else | ||
311 | 40 | ipaddr=$(awk '$1 == "DEFAULT_MAAS_URL" { split($0,array,"/")} END{print array[3] }' /etc/maas/maas_local_settings.py) | 40 | ipaddr=$(awk '$1 == "DEFAULT_MAAS_URL" { split($0,array,"/")} END{print array[3] }' /etc/maas/maas_local_settings.py) |
312 | 41 | db_set maas/default-maas-url "$ipaddr" | 41 | db_set maas/default-maas-url "$ipaddr" |
313 | 42 | fi | 42 | fi |
314 | 43 | 43 | ||
315 | === modified file 'debian/maas-region-controller.postinst' | |||
316 | --- debian/maas-region-controller.postinst 2012-11-20 22:13:28 +0000 | |||
317 | +++ debian/maas-region-controller.postinst 2013-03-20 17:45:26 +0000 | |||
318 | @@ -1,4 +1,6 @@ | |||
320 | 1 | #!/bin/sh -e | 1 | #!/bin/sh |
321 | 2 | |||
322 | 3 | set -e | ||
323 | 2 | 4 | ||
324 | 3 | . /usr/share/debconf/confmodule | 5 | . /usr/share/debconf/confmodule |
325 | 4 | db_version 2.0 | 6 | db_version 2.0 |
326 | @@ -13,36 +15,16 @@ | |||
327 | 13 | maas migrate metadataserver --noinput | 15 | maas migrate metadataserver --noinput |
328 | 14 | } | 16 | } |
329 | 15 | 17 | ||
330 | 16 | restart_apache2(){ | ||
331 | 17 | if [ -x /usr/sbin/invoke-rc.d ]; then | ||
332 | 18 | invoke-rc.d apache2 restart || true | ||
333 | 19 | else | ||
334 | 20 | /etc/init.d/apache2 restart || true | ||
335 | 21 | fi | ||
336 | 22 | } | ||
337 | 23 | |||
338 | 24 | restart_rabbitmq(){ | 18 | restart_rabbitmq(){ |
344 | 25 | if [ -x /usr/sbin/invoke-rc.d ]; then | 19 | invoke-rc.d rabbitmq-server restart || true |
340 | 26 | invoke-rc.d rabbitmq-server restart || true | ||
341 | 27 | else | ||
342 | 28 | /etc/init.d/rabbitmq-server restart || true | ||
343 | 29 | fi | ||
345 | 30 | } | 20 | } |
346 | 31 | 21 | ||
347 | 32 | restart_postgresql(){ | 22 | restart_postgresql(){ |
353 | 33 | if [ -x /usr/sbin/invoke-rc.d ]; then | 23 | invoke-rc.d --force postgresql restart || true |
349 | 34 | invoke-rc.d --force postgresql restart || true | ||
350 | 35 | else | ||
351 | 36 | /etc/init.d/postgresql restart || true | ||
352 | 37 | fi | ||
354 | 38 | } | 24 | } |
355 | 39 | 25 | ||
356 | 40 | restart_squid_deb_proxy() { | 26 | restart_squid_deb_proxy() { |
362 | 41 | if [ -x /usr/sbin/invoke-rc.d ]; then | 27 | invoke-rc.d squid-deb-proxy restart || true |
358 | 42 | invoke-rc.d squid-deb-proxy restart || true | ||
359 | 43 | else | ||
360 | 44 | /etc/init.d/squid-deb-proxy restart || true | ||
361 | 45 | fi | ||
363 | 46 | } | 28 | } |
364 | 47 | 29 | ||
365 | 48 | configure_maas_txlongpoll_rabbitmq_user() { | 30 | configure_maas_txlongpoll_rabbitmq_user() { |
366 | @@ -191,17 +173,13 @@ | |||
367 | 191 | mkdir -p /var/log/maas/rsyslog | 173 | mkdir -p /var/log/maas/rsyslog |
368 | 192 | chown -R syslog:syslog /var/log/maas/rsyslog | 174 | chown -R syslog:syslog /var/log/maas/rsyslog |
369 | 193 | # Make sure rsyslog reads our config | 175 | # Make sure rsyslog reads our config |
373 | 194 | if [ -x /usr/sbin/invoke-rc.d ]; then | 176 | invoke-rc.d rsyslog restart |
371 | 195 | invoke-rc.d rsyslog restart | ||
372 | 196 | fi | ||
374 | 197 | 177 | ||
375 | 198 | ######################################################### | 178 | ######################################################### |
376 | 199 | ################### Squid-deb-proxy #################### | 179 | ################### Squid-deb-proxy #################### |
377 | 200 | ######################################################### | 180 | ######################################################### |
378 | 201 | # Make sure squid-deb-proxy reads our config (99-maas) | 181 | # Make sure squid-deb-proxy reads our config (99-maas) |
382 | 202 | if [ -x /usr/sbin/invoke-rc.d ]; then | 182 | invoke-rc.d squid-deb-proxy restart |
380 | 203 | invoke-rc.d squid-deb-proxy restart | ||
381 | 204 | fi | ||
383 | 205 | 183 | ||
384 | 206 | ######################################################### | 184 | ######################################################### |
385 | 207 | ########## Configure longpoll rabbitmq config ########### | 185 | ########## Configure longpoll rabbitmq config ########### |
386 | @@ -239,11 +217,10 @@ | |||
387 | 239 | db_input high maas/installation-note || true | 217 | db_input high maas/installation-note || true |
388 | 240 | db_go | 218 | db_go |
389 | 241 | 219 | ||
391 | 242 | elif [ "$1" = "reconfigure" ] || [ -n "$DEBCONF_RECONFIGURE" ]; then | 220 | elif [ -n "$DEBCONF_RECONFIGURE" ]; then |
392 | 243 | # Set the IP address of the interface with default route | 221 | # Set the IP address of the interface with default route |
393 | 244 | db_get maas/default-maas-url | 222 | db_get maas/default-maas-url |
394 | 245 | ipaddr="$RET" | 223 | ipaddr="$RET" |
395 | 246 | db_set maas/default-maas-url "$ipaddr" | ||
396 | 247 | if [ -n "$ipaddr" ]; then | 224 | if [ -n "$ipaddr" ]; then |
397 | 248 | configure_maas_default_url "$ipaddr" | 225 | configure_maas_default_url "$ipaddr" |
398 | 249 | configure_maas_squid_deb_proxy "$ipaddr" | 226 | configure_maas_squid_deb_proxy "$ipaddr" |
399 | @@ -252,9 +229,7 @@ | |||
400 | 252 | 229 | ||
401 | 253 | elif [ "$1" = "configure" ] && dpkg --compare-versions "$2" gt 0.1+bzr266+dfsg-0ubuntu1; then | 230 | elif [ "$1" = "configure" ] && dpkg --compare-versions "$2" gt 0.1+bzr266+dfsg-0ubuntu1; then |
402 | 254 | # If upgrading to any later package version, then upgrade db. | 231 | # If upgrading to any later package version, then upgrade db. |
406 | 255 | if [ -x /usr/sbin/invoke-rc.d ]; then | 232 | invoke-rc.d apache2 stop || true |
404 | 256 | invoke-rc.d apache2 stop || true | ||
405 | 257 | fi | ||
407 | 258 | 233 | ||
408 | 259 | # make sure postgresql is running | 234 | # make sure postgresql is running |
409 | 260 | restart_postgresql | 235 | restart_postgresql |
410 | @@ -284,12 +259,10 @@ | |||
411 | 284 | 259 | ||
412 | 285 | fi | 260 | fi |
413 | 286 | 261 | ||
415 | 287 | restart_apache2 | 262 | invoke-rc.d apache2 restart || true |
416 | 288 | 263 | ||
417 | 289 | restart_squid_deb_proxy | 264 | restart_squid_deb_proxy |
418 | 290 | 265 | ||
419 | 291 | db_stop | 266 | db_stop |
420 | 292 | 267 | ||
421 | 293 | #DEBHELPER# | 268 | #DEBHELPER# |
422 | 294 | |||
423 | 295 | exit 0 | ||
424 | 296 | 269 | ||
425 | === modified file 'debian/maas-region-controller.postrm' | |||
426 | --- debian/maas-region-controller.postrm 2012-11-20 22:13:28 +0000 | |||
427 | +++ debian/maas-region-controller.postrm 2013-03-20 17:45:26 +0000 | |||
428 | @@ -22,8 +22,6 @@ | |||
429 | 22 | # Restarting apache2 | 22 | # Restarting apache2 |
430 | 23 | if [ -x /usr/sbin/invoke-rc.d ]; then | 23 | if [ -x /usr/sbin/invoke-rc.d ]; then |
431 | 24 | invoke-rc.d apache2 restart || true | 24 | invoke-rc.d apache2 restart || true |
432 | 25 | else | ||
433 | 26 | /etc/init.d/apache2 restart || true | ||
434 | 27 | fi | 25 | fi |
435 | 28 | 26 | ||
436 | 29 | # Delete symlink | 27 | # Delete symlink |
437 | @@ -48,5 +46,3 @@ | |||
438 | 48 | #DEBHELPER# | 46 | #DEBHELPER# |
439 | 49 | 47 | ||
440 | 50 | db_stop | 48 | db_stop |
441 | 51 | |||
442 | 52 | exit 0 | ||
443 | 53 | 49 | ||
444 | === modified file 'debian/maas-region-controller.prerm' | |||
445 | --- debian/maas-region-controller.prerm 2012-09-28 02:40:23 +0000 | |||
446 | +++ debian/maas-region-controller.prerm 2013-03-20 17:45:26 +0000 | |||
447 | @@ -6,13 +6,7 @@ | |||
448 | 6 | 6 | ||
449 | 7 | #DEBHELPER# | 7 | #DEBHELPER# |
450 | 8 | 8 | ||
456 | 9 | if [ -x /usr/sbin/invoke-rc.d ]; then | 9 | invoke-rc.d apache2 stop || true |
452 | 10 | invoke-rc.d apache2 stop || true | ||
453 | 11 | else | ||
454 | 12 | /etc/init.d/apache2 stop || true | ||
455 | 13 | fi | ||
457 | 14 | 10 | ||
458 | 15 | . /usr/share/dbconfig-common/dpkg/prerm.pgsql | 11 | . /usr/share/dbconfig-common/dpkg/prerm.pgsql |
459 | 16 | dbc_go maas-region-controller $@ | 12 | dbc_go maas-region-controller $@ |
460 | 17 | |||
461 | 18 | exit 0 |
Approving mysql.