Merge lp:~andreserl/maas/bugfixes-bzr415 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: 37
Proposed branch: lp:~andreserl/maas/bugfixes-bzr415
Merge into: lp:~maas-maintainers/maas/packaging
Diff against target: 108 lines (+31/-18)
4 files modified
debian/changelog (+10/-1)
debian/control (+1/-1)
debian/maas-dhcp.config (+9/-16)
debian/maas-dhcp.postinst (+11/-0)
To merge this branch: bzr merge lp:~andreserl/maas/bugfixes-bzr415
Reviewer Review Type Date Requested Status
Andres Rodriguez (community) Approve
Julian Edwards (community) Approve
Review via email: mp+101152@code.launchpad.net

Commit message

* debian/maas-dhcp.{config,postinst}:
  - Fix not setting new values on fresh install. (LP: #975321)
  - Fix unsetting domain, otherwise, even if disabled, it will always be set.
* debian/control: Depends on maas for maas-dhcp.

To post a comment you must log in.
Revision history for this message
Julian Edwards (julian-edwards) :
review: Approve
Revision history for this message
MAAS Lander (maas-lander) wrote :

Attempt to merge into lp:~maas-maintainers/maas/packaging failed due to conflicts:

text conflict in debian/changelog

Revision history for this message
Andres Rodriguez (andreserl) wrote :

Resolved the conflict. It was due a newer branch lading before this older branch.

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-04-10 02:20:30 +0000
3+++ debian/changelog 2012-04-10 04:32:18 +0000
4@@ -1,9 +1,18 @@
5-maas (0.1+bzr415+dfsg-0ubuntu2) UNRELEASED; urgency=low
6+maas (0.1+bzr415+dfsg-0ubuntu3) UNRELEASED; urgency=low
7
8 * add dependency on distro-info (LP: #949442)
9
10 -- Scott Moser <smoser@ubuntu.com> Mon, 09 Apr 2012 22:19:51 -0400
11
12+maas (0.1+bzr415+dfsg-0ubuntu2) precise; urgency=low
13+
14+ * debian/maas-dhcp.{config,postinst}:
15+ - Fix not setting new values on fresh install. (LP: #975321)
16+ - Fix unsetting domain, otherwise, even if disabled, it will always be set.
17+ * debian/control: Depends on maas for maas-dhcp.
18+
19+ -- Andres Rodriguez <andreserl@ubuntu.com> Fri, 06 Apr 2012 15:30:44 -0400
20+
21 maas (0.1+bzr415+dfsg-0ubuntu1) precise; urgency=low
22
23 * debian/control: Update package descriptions; Suggests maas-dhcp for maas
24
25=== modified file 'debian/control'
26--- debian/control 2012-04-10 02:20:30 +0000
27+++ debian/control 2012-04-10 04:32:18 +0000
28@@ -71,7 +71,7 @@
29
30 Package: maas-dhcp
31 Architecture: all
32-Depends: dnsmasq
33+Depends: maas, dnsmasq
34 Description: Ubuntu MAAS Server - DHCP configuration
35 Ubuntu MAAS Server is the successor to Orchestra. It offers a
36 nice UI to provision your Ubuntu servers. Each physical server
37
38=== modified file 'debian/maas-dhcp.config'
39--- debian/maas-dhcp.config 2012-04-04 15:44:12 +0000
40+++ debian/maas-dhcp.config 2012-04-10 04:32:18 +0000
41@@ -4,11 +4,11 @@
42 if ([ "$1" = "configure" ] && [ -z "$2" ]) || [ "$1" = "reconfigure" ]; then
43 . /usr/share/debconf/confmodule
44
45- # Try to obtain the default range for dnsmasq-dhcp-range and set it
46- range=$(grep -s "^dhcp-range=.*$" /etc/cobbler/dnsmasq.template | awk '{split($0,array,"=")} END{print array[2]}')
47- if [ -n "$range" ]; then
48- db_set maas-dhcp/dnsmasq-dhcp-range "$range"
49- fi
50+ # Try to obtain the default range for dnsmasq-dhcp-range and set it
51+ range=$(grep -s "^dhcp-range=.*$" /etc/cobbler/dnsmasq.template | awk '{split($0,array,"=")} END{print array[2]}')
52+ if [ -n "$range" ]; then
53+ db_set maas-dhcp/dnsmasq-dhcp-range "$range"
54+ fi
55
56 # try to obtain the default gateway and set it
57 gateway=$(grep -s "^dhcp-option=.*$" /etc/cobbler/dnsmasq.template | awk '{split($0,array,"3,")} END{print array[2]}')
58@@ -21,17 +21,10 @@
59 fi
60
61 # try to obtain the domain and set it
62- domain=$(grep -s "^domain=.*$" /etc/cobbler/dnsmasq.template | awk '{split($0,array,"=")} END{print array[2]}')
63- if [ -n "$domain" ]; then
64- db_set maas-dhcp/dnsmasq-domain-name "$domain"
65- fi
66-
67- db_input high maas-dhcp/dnsmasq-dhcp-range || true
68- db_go
69- db_input high maas-dhcp/dnsmasq-default-gateway || true
70- db_go
71- db_input high maas-dhcp/dnsmasq-domain-name || true
72- db_go
73+ domain=$(grep -s "^domain=.*$" /etc/cobbler/dnsmasq.template | awk '{split($0,array,"=")} END{print array[2]}')
74+ if [ -n "$domain" ]; then
75+ db_set maas-dhcp/dnsmasq-domain-name "$domain"
76+ fi
77
78 fi
79 #DEBHELPER#
80
81=== modified file 'debian/maas-dhcp.postinst'
82--- debian/maas-dhcp.postinst 2012-04-04 15:44:12 +0000
83+++ debian/maas-dhcp.postinst 2012-04-10 04:32:18 +0000
84@@ -4,6 +4,12 @@
85 db_version 2.0
86
87 if ([ "$1" = "configure" ] && [ -z "$2" ]) || [ "$1" = "reconfigure" ] || [ -n "$DEBCONF_RECONFIGURE" ]; then
88+ db_input high maas-dhcp/dnsmasq-dhcp-range || true
89+ db_go
90+ db_input high maas-dhcp/dnsmasq-default-gateway || true
91+ db_go
92+ db_input high maas-dhcp/dnsmasq-domain-name || true
93+ db_go
94
95 # Setup dnsmasq
96 sed -i -e "s/^manage_dns:.*$/manage_dns: 1/" \
97@@ -39,6 +45,11 @@
98 elif grep -qs "^domain=.*$" /etc/cobbler/dnsmasq.template; then
99 sed -i -e "s/^domain=.*$/domain=$domain/" /etc/cobbler/dnsmasq.template
100 fi
101+ elif [ -z "$domain" ]; then
102+ # if the domain has been set to empty, then disable it
103+ if grep -qs "^domain=.*$" /etc/cobbler/dnsmasq.template; then
104+ sed -i -e "s/^domain=.*$/#domain=/" /etc/cobbler/dnsmasq.template
105+ fi
106 fi
107 if [ -x /usr/sbin/invoke-rc.d ]; then
108 invoke-rc.d cobbler restart || true

Subscribers

People subscribed via source and target branches

to all changes: