~andreserl/maas/packaging_release_alpha2

« back to all changes in this revision

Viewing changes to debian/maas-cluster-controller.config

  • Committer: MAAS Lander
  • Author(s): Andres Rodriguez, Gavin Panella
  • Date: 2015-06-24 21:36:21 UTC
  • mfrom: (381.2.14 packaging.regiond-conf)
  • Revision ID: maas_lander-20150624213621-odxv7u7bi72a2bw4
[r=andreserl][bug=][author=allenap] Use new local configuration support for the region.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
    db_get maas-cluster-controller/maas-url || true
13
13
    if [ -z "$RET" ]; then
14
14
        # Attempt to pre-populate if installing on the region controller.
15
 
        if [ -e /etc/maas/maas_local_settings.py ]; then
16
 
            url=$(awk '$1 == "DEFAULT_MAAS_URL" { split($0,array,"\"")} END{print array[2] }' /etc/maas/maas_local_settings.py)
 
15
        if [ -e /etc/maas/regiond.conf ]; then
 
16
            url=$(maas-region-admin local_config_get --maas-url --plain)
17
17
            # If the URL doesn't end in /MAAS then add it. This helps upgrades from
18
18
            # precise for which the URL didn't contain /MAAS, which is now required
19
19
            if ! echo $url | grep -qs "/MAAS$"; then
22
22
            db_set maas-cluster-controller/maas-url "$url"
23
23
        else
24
24
            # Will only get here if dbconf value not already set, or
25
 
            # /etc/maas/maas_local_settings.py doesn't exist.
 
25
            # /etc/maas/regiond.conf doesn't exist.
26
26
            db_input medium maas-cluster-controller/maas-url || true
27
27
            db_go
28
28
        fi