This file is indexed.

config is in maas 0.1+bzr482+dfsg-0ubuntu1.

This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/sh -e

. /usr/share/debconf/confmodule
db_version 2.0

# creates question
set_question() {
	if ! db_fget "$1" seen; then
		db_register dbconfig-common/dbconfig-install "$1"
		db_subst "$1" ID "$1"
		db_fget "$1" seen
	fi
	if [ "$RET" = false ]; then
		db_set "$1" "$2"
		db_fset "$1" seen true
	fi
}

# source dbconfig-common shell library, and call the hook function
if [ -f /usr/share/dbconfig-common/dpkg/config.pgsql ]; then
	. /usr/share/dbconfig-common/dpkg/config.pgsql
fi

if ([ "$1" = "configure" ] && [ -z "$2" ]); then
	dbc_dbname="maasdb"
	dbc_dbuser="maas"
	dbc_remove="true"

	# Hide maas/dbconfig-install question by setting default.
	set_question maas/dbconfig-install true
	set_question maas/pgsql/app-pass ""
	dbc_go maas $@

elif [ "$1" = "reconfigure" ] || [ -n "$DEBCONF_RECONFIGURE" ]; then
	db_get maas/default-maas-url || true
	if [ -n "$RET" ]; then
		db_set maas/default-maas-url "$RET"
	else
		ipaddr=$(awk '$1 == "DEFAULT_MAAS_URL" { split($0,array,"/")} END{print array[3] }' /etc/maas/maas_local_settings.py)
		db_set maas/default-maas-url "$ipaddr"
	fi
	db_input low maas/default-maas-url || true
	db_go
fi