← Back to team overview

launchpad-reviewers team mailing list archive

lp:~allenap/maas/packaging.cluster-pserv-address-bug-1081212-part-2-the-revenge into lp:~maas-maintainers/maas/packaging

 

Gavin Panella has proposed merging lp:~allenap/maas/packaging.cluster-pserv-address-bug-1081212-part-2-the-revenge into lp:~maas-maintainers/maas/packaging.

Commit message:
Remove leading comment markers from the 'generator' line in pserv.yaml during cluster postinst.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  Bug #1081212 in maas (Ubuntu): "The address of the API in pserv.conf (tftp/generator) is http://localhost/MAAS/api/1.0/pxeconfig/";
  https://bugs.launchpad.net/ubuntu/+source/maas/+bug/1081212

For more details, see:
https://code.launchpad.net/~allenap/maas/packaging.cluster-pserv-address-bug-1081212-part-2-the-revenge/+merge/136414
-- 
https://code.launchpad.net/~allenap/maas/packaging.cluster-pserv-address-bug-1081212-part-2-the-revenge/+merge/136414
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~allenap/maas/packaging.cluster-pserv-address-bug-1081212-part-2-the-revenge into lp:~maas-maintainers/maas/packaging.
=== modified file 'debian/changelog'
--- debian/changelog	2012-11-23 00:08:07 +0000
+++ debian/changelog	2012-11-27 13:40:48 +0000
@@ -34,6 +34,8 @@
     configuration file are no longer part of upstream.
   * debian/maas-cluster-controller.install: The maas-import-pxe-files cron
     task is no longer used.
+  * debian/maas-cluster-controller.postinst: Remove leading comment
+    markers from the 'generator' line in pserv.yaml.
 
   [ Andres Rodriguez ]
   * debian/control:

=== modified file 'debian/maas-cluster-controller.postinst'
--- debian/maas-cluster-controller.postinst	2012-11-22 22:48:32 +0000
+++ debian/maas-cluster-controller.postinst	2012-11-27 13:40:48 +0000
@@ -57,9 +57,9 @@
         sed -i "s|MAAS_URL=.*|MAAS_URL="$RET"|" /etc/maas/maas_cluster.conf
         # Extract the hostname part.
         HOSTPART=$(echo $RET|awk '{ split($0,array,"/")} END{print array[3] }')
-        # And substitute it in-place in pserv.conf on an indented, non-commented
+        # And substitute it in-place in pserv.yaml on an indented, non-commented
         # line.
-        sed -ri "s|^([[:space:]]+generator:[[:space:]]+https?://)[^:/]+|\1$HOSTPART|" /etc/maas/pserv.conf
+        sed -ri "s|^([[:space:]]+)(#+[[:space:]]*)?(generator:[[:space:]]+https?://)[^:/]+|\1\3$HOSTPART|" /etc/maas/pserv.yaml
     fi
 fi