launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #12820
[Merge] lp:~julian-edwards/maas/broken-dns-install-bug-1060549 into lp:~maas-maintainers/maas/packaging
Julian Edwards has proposed merging lp:~julian-edwards/maas/broken-dns-install-bug-1060549 into lp:~maas-maintainers/maas/packaging.
Commit message:
Ensure maas-dns postinst creates the maas user before trying to chown files
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
Bug #1060549 in maas (Ubuntu): "maas-dns fails to install because maas user hasn't been created yet"
https://bugs.launchpad.net/ubuntu/+source/maas/+bug/1060549
For more details, see:
https://code.launchpad.net/~julian-edwards/maas/broken-dns-install-bug-1060549/+merge/127621
--
https://code.launchpad.net/~julian-edwards/maas/broken-dns-install-bug-1060549/+merge/127621
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~julian-edwards/maas/broken-dns-install-bug-1060549 into lp:~maas-maintainers/maas/packaging.
=== modified file 'debian/changelog'
--- debian/changelog 2012-10-02 18:42:28 +0000
+++ debian/changelog 2012-10-03 01:38:19 +0000
@@ -1,9 +1,10 @@
-maas (0.1+bzr1134+dfsg-0ubuntu2) UNRELEASED; urgency=low
+maas (0.1+bzr1137+dfsg-0ubuntu2) UNRELEASED; urgency=low
* New upstream release.
[ Julian Edwards ]
* Ensure isc-dhcp-server is disabled when installing maas-dhcp.
+ * Ensure maas-dns creates the maas user before trying to chown files.
[ Raphaël Badin ]
* Split celery config into cluster and region configs.
@@ -25,7 +26,7 @@
* debian/control: Depends on python-netifaces.
* debian/maas-region-controller: Install maas-import-squashfs
- -- Andres Rodriguez <andreserl@xxxxxxxxxx> Tue, 02 Oct 2012 13:39:47 -0400
+ -- Julian Edwards <julian.edwards@xxxxxxxxxxxxx> Wed, 03 Oct 2012 11:26:05 +1000
maas (0.1+bzr1110+dfsg-0ubuntu1) quantal; urgency=low
=== modified file 'debian/maas-dns.postinst'
--- debian/maas-dns.postinst 2012-08-31 18:04:22 +0000
+++ debian/maas-dns.postinst 2012-10-03 01:38:19 +0000
@@ -1,6 +1,23 @@
#!/bin/sh -e
+add_user_group(){
+ local user="maas"
+ local group="maas"
+ if ! getent group "$group" >/dev/null; then
+ addgroup --quiet --system "$group" || true
+ fi
+ if ! getent passwd "$user" > /dev/null 2>&1; then
+ adduser --quiet \
+ --system \
+ --group \
+ --no-create-home \
+ "$user" || true
+ fi
+}
+
if ([ "$1" = "configure" ] && [ -z "$2" ]) || [ "$1" = "reconfigure" ] || [ -n "$DEBCONF_RECONFIGURE" ]; then
+ add_user_group
+
# If /etc/bind/maas is empty, set_up_dns.
if [ ! "$(ls -A /etc/bind/maas)" ]; then
maas set_up_dns
Follow ups