Merge lp:~andreserl/maas/packaging_bzr957 into lp:~maas-maintainers/maas/packaging

Proposed by Andres Rodriguez
Status: Merged
Approved by: Andres Rodriguez
Approved revision: no longer in the source branch.
Merged at revision: 76
Proposed branch: lp:~andreserl/maas/packaging_bzr957
Merge into: lp:~maas-maintainers/maas/packaging
Diff against target: 136 lines (+54/-29)
5 files modified
debian/changelog (+2/-0)
debian/maas-dhcp.config (+13/-8)
debian/maas-dhcp.postinst (+22/-19)
debian/maas-dhcp.templates (+8/-0)
debian/maas.prerm (+9/-2)
To merge this branch: bzr merge lp:~andreserl/maas/packaging_bzr957
Reviewer Review Type Date Requested Status
Andres Rodriguez (community) Approve
Review via email: mp+122722@code.launchpad.net

Commit message

* debian/maas-dhcp.config: Ask whether we want to enable DHCP (LP: #1044229)
* debian/maas.prerm: Stop services before removing database (LP: #1044559)

To post a comment you must log in.
Revision history for this message
Andres Rodriguez (andreserl) wrote :

Reviewing/approving myself. This has been tested and are simple changes.

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 2012-08-31 19:13:57 +0000
3+++ debian/changelog 2012-09-04 17:01:19 +0000
4@@ -29,6 +29,8 @@
5 - debian/maas.postrm: Only call dbc_go when config file exists.
6 * debian/maas.maas-celery.upstart: Enable Beat and set scheduler db file.
7 * debian/maas-dns.postinst: Set correct permissions. (LP: #1042868)
8+ * debian/maas-dhcp.config: Ask whether we want to enable DHCP (LP: #1044229)
9+ * debian/maas.prerm: Stop services before removing database (LP: #1044559)
10
11 -- Andres Rodriguez <andreserl@ubuntu.com> Thu, 02 Aug 2012 09:01:43 -0400
12
13
14=== modified file 'debian/maas-dhcp.config'
15--- debian/maas-dhcp.config 2012-08-27 18:36:10 +0000
16+++ debian/maas-dhcp.config 2012-09-04 17:01:19 +0000
17@@ -4,14 +4,19 @@
18 if ([ "$1" = "configure" ] && [ -z "$2" ]) || [ "$1" = "reconfigure" ]; then
19 . /usr/share/debconf/confmodule
20
21- db_input high maas-dhcp/maas-dhcp-range || true
22- db_go
23- db_input high maas-dhcp/maas-dhcp-netmask || true
24- db_go
25- db_input high maas-dhcp/maas-dhcp-broadcast || true
26- db_go
27- db_input high maas-dhcp/maas-dhcp-gateway || true
28- db_go
29+ db_input high maas-dhcp/maas-dhcp-enabled || true
30+ db_go
31+ db_get maas-dhcp/maas-dhcp-enabled || true
32+ if [ "$RET" = "true" ]; then
33+ db_input high maas-dhcp/maas-dhcp-range || true
34+ db_go
35+ db_input high maas-dhcp/maas-dhcp-netmask || true
36+ db_go
37+ db_input high maas-dhcp/maas-dhcp-broadcast || true
38+ db_go
39+ db_input high maas-dhcp/maas-dhcp-gateway || true
40+ db_go
41+ fi
42
43 fi
44 #DEBHELPER#
45
46=== modified file 'debian/maas-dhcp.postinst'
47--- debian/maas-dhcp.postinst 2012-08-28 16:13:51 +0000
48+++ debian/maas-dhcp.postinst 2012-09-04 17:01:19 +0000
49@@ -4,26 +4,29 @@
50 db_version 2.0
51
52 if ([ "$1" = "configure" ] && [ -z "$2" ]) || [ "$1" = "reconfigure" ] || [ -n "$DEBCONF_RECONFIGURE" ]; then
53- # Obtain the DHCP range
54- db_get maas-dhcp/maas-dhcp-range || true
55- range="$RET"
56- range_low=$(echo $range | cut -f1 -d",")
57- range_high=$(echo $range | cut -f2 -d",")
58-
59- # Obtain the netmask
60- db_get maas-dhcp/maas-dhcp-netmask || true
61- netmask="$RET"
62-
63- # Obtain the broadcast
64- db_get maas-dhcp/maas-dhcp-broadcast || true
65- broadcast="$RET"
66-
67- # Obtain the gateway
68- db_get maas-dhcp/maas-dhcp-gateway || true
69- gateway="$RET"
70-
71- maas config_master_dhcp --ip-range-low="$range_low" --ip-range-high="$range_high" \
72+ db_get maas-dhcp/maas-dhcp-enabled || true
73+ if [ "$RET" = "true" ]; then
74+ # Obtain the DHCP range
75+ db_get maas-dhcp/maas-dhcp-range || true
76+ range="$RET"
77+ range_low=$(echo $range | cut -f1 -d",")
78+ range_high=$(echo $range | cut -f2 -d",")
79+
80+ # Obtain the netmask
81+ db_get maas-dhcp/maas-dhcp-netmask || true
82+ netmask="$RET"
83+
84+ # Obtain the broadcast
85+ db_get maas-dhcp/maas-dhcp-broadcast || true
86+ broadcast="$RET"
87+
88+ # Obtain the gateway
89+ db_get maas-dhcp/maas-dhcp-gateway || true
90+ gateway="$RET"
91+
92+ maas config_master_dhcp --ip-range-low="$range_low" --ip-range-high="$range_high" \
93 --router-ip="$gateway" --subnet-mask="$netmask" --broadcast-ip="$broadcast"
94+ fi
95
96 fi
97
98
99=== modified file 'debian/maas-dhcp.templates'
100--- debian/maas-dhcp.templates 2012-08-27 18:36:10 +0000
101+++ debian/maas-dhcp.templates 2012-09-04 17:01:19 +0000
102@@ -1,3 +1,11 @@
103+Template: maas-dhcp/maas-dhcp-enabled
104+Type: boolean
105+Default: true
106+_Description: Enable Ubuntu MAAS Server managed DHCP:
107+ Ubuntu MAAS Server can manage DHCP for address allocation for
108+ the provisioned systems. If you manage your DHCP elsewhere,
109+ you should disable this option.
110+
111 Template: maas-dhcp/maas-dhcp-range
112 Type: string
113 Default: 192.168.1.5,192.168.1.200
114
115=== modified file 'debian/maas.prerm'
116--- debian/maas.prerm 2012-03-14 02:01:25 +0000
117+++ debian/maas.prerm 2012-09-04 17:01:19 +0000
118@@ -3,9 +3,16 @@
119 set -e
120
121 . /usr/share/debconf/confmodule
122+
123+#DEBHELPER#
124+
125+if [ -x /usr/sbin/invoke-rc.d ]; then
126+ invoke-rc.d apache2 stop || true
127+else
128+ /etc/init.d/apache2 stop || true
129+fi
130+
131 . /usr/share/dbconfig-common/dpkg/prerm.pgsql
132 dbc_go maas $@
133
134-#DEBHELPER#
135-
136 exit 0

Subscribers

People subscribed via source and target branches

to all changes: