← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~jtv/maas/p-sru-pkg-bug-1089508 into lp:~maas-maintainers/maas/packaging.precise.sru

 

Jeroen T. Vermeulen has proposed merging lp:~jtv/maas/p-sru-pkg-bug-1089508 into lp:~maas-maintainers/maas/packaging.precise.sru.

Commit message:
Backport packaging r157: handle single-quoted CLUSTER_UUID in migration to maas_cluster.conf.

Requested reviews:
  MAAS Maintainers (maas-maintainers)

For more details, see:
https://code.launchpad.net/~jtv/maas/p-sru-pkg-bug-1089508/+merge/139606
-- 
https://code.launchpad.net/~jtv/maas/p-sru-pkg-bug-1089508/+merge/139606
Your team MAAS Maintainers is requested to review the proposed merge of lp:~jtv/maas/p-sru-pkg-bug-1089508 into lp:~maas-maintainers/maas/packaging.precise.sru.
=== modified file 'debian/maas-cluster-controller.postinst'
--- debian/maas-cluster-controller.postinst	2012-12-12 07:14:04 +0000
+++ debian/maas-cluster-controller.postinst	2012-12-13 02:30:26 +0000
@@ -30,9 +30,7 @@
     # Extract ClUSTER_UUID setting from config file $1.  This will work
     # both the cluster celery config (which is python) and the cluster
     # config (which is shell).
-    local config_file="$1"
-    grep "^CLUSTER_UUID *= *[\"'][^\"']*[\"']" $config_file |
-        sed -e "s/^CLUSTER_UUID *= *\"\([^\"']*\)\".*/\1/"
+    sed -n -e "s/^CLUSTER_UUID *= *[\"']\([^\"']*\).*/\1/p" "$1"
 }
 
 configure_cluster_uuid(){


Follow ups