~ubuntu-branches/ubuntu/saucy/maas/saucy-updates

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Andres Rodriguez, Andres Rodriguez, Steve Langasek
  • Date: 2013-03-19 15:38:22 UTC
  • mfrom: (1.2.6)
  • Revision ID: package-import@ubuntu.com-20130319153822-17izmcpy6wjlyfqi
Tags: 1.3+bzr1455+dfsg-0ubuntu1
* New upstream bugfix release.
  - Fixes and returns the 'resource_url' with the 'canonical' url for
    a file that is fetched using the API (LP: #1154142)

[ Andres Rodriguez ]
* debian/control:
  - Change Conflicts/Replaces for Breaks/Replaces.
  - Conflicts on tftpd-hpa and dnsmasq.
  - Do not pre-depends, but Depends on ${misc:Depends} for 'maas'.

[ Steve Langasek ]
* postinst scripts are never called with 'reconfigure' as the script
  argument.  Remove references to this (mythical) invocation.
* always call 'set -e' from maintainer scripts instead of passing 'sh -e'
  as the interpreter, so that scripts will behave correctly when run via
  'sh -x'.
* invoke-rc.d is never allowed to not exist - simplify scripts (and make
  them better policy-compliant) by invoking unconditionally.  (The only
  possible exception is in the postrm, where it's *theoretically* possible
  for invoke-rc.d to be missing if the user has completely stripped
  down their system; that's a fairly unreasonable corner case, but we
  might as well be correct if it ever happens.)
* db_get+db_set is a no-op; don't call db_set to push back a value we just
  got from db_get.
* Omit superfluous calls to 'exit 0' at the end of each script.
* Remove maas-cluster-controller prerm script, which called debconf for no
  reason.
* Don't invoke debconf in the postrm script either, debhelper already does
  this for us.
* Other miscellaneous maintainer script fixes
* debian/maas-common.postinst: call adduser and addgroup unconditionally;
  the tools are already designed to DTRT, we don't need to check for the
  user/group existence before calling them nor should we worry about
  calling them only once on first install.
* debian/maas-common.postrm: delete the maas group, not just the user,
  as the comment in the code implies we should do.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh -e
 
1
#!/bin/sh
 
2
 
 
3
set -e
2
4
 
3
5
. /usr/share/debconf/confmodule
4
6
db_version 2.0
21
23
        . /usr/share/dbconfig-common/dpkg/config.pgsql
22
24
fi
23
25
 
24
 
if ([ "$1" = "configure" ] && [ -z "$2" ]); then
 
26
if [ "$1" = "configure" ] && [ -z "$2" ]; then
25
27
        # Hide maas/dbconfig-install question by setting default.
26
28
        set_question maas-region-controller/dbconfig-install true
27
29
        set_question maas-region-controller/pgsql/app-pass ""
32
34
 
33
35
        dbc_go maas-region-controller $@
34
36
 
35
 
elif [ "$1" = "reconfigure" ] || [ -n "$DEBCONF_RECONFIGURE" ]; then
 
37
elif [ -n "$DEBCONF_RECONFIGURE" ]; then
36
38
        db_get maas/default-maas-url || true
37
 
        if [ -n "$RET" ]; then
38
 
                db_set maas/default-maas-url "$RET"
39
 
        else
 
39
        if [ -z "$RET" ]; then
40
40
                ipaddr=$(awk '$1 == "DEFAULT_MAAS_URL" { split($0,array,"/")} END{print array[3] }' /etc/maas/maas_local_settings.py)
41
41
                db_set maas/default-maas-url "$ipaddr"
42
42
        fi