This file is indexed.

config is in mailman 1:2.1.14-3.

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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#! /bin/sh -e
# $URL: svn+ssh://svn.debian.org/svn/svn/pkg-mailman/trunk/debian/config $
# $Id: config 693 2011-10-08 15:30:38Z thijs $

. /usr/share/debconf/confmodule

crontab=/etc/cron.d/mailman

get_used_languages ()
{
  # Python being non-essential it may not be available at preconfigure
  # time, but then no languages are used either.
  if python </dev/null 2>/dev/null ; then
    # list_lists may fail if mm_cfg is not yet installed
    ( for ml in $(list_lists -b 2>/dev/null); do
        ( config_list -o - ${ml} 2>/dev/null
          cat <<EOF
try: print '\n'.join(available_languages)
except: pass
EOF
        ) | python -W ignore::DeprecationWarning
      done 
    ) | sort | uniq
  fi
}

# This script will be invoked by apt-get 2 times in a row, once when
# preconfiguring the package and a second time just before running the
# postinst script.  OTOH when installing the package with dpkg or when
# reconfiguring the package, it runs only once.
#
# It scans all mailing lists on a system for used languages which may
# be quite time consuming on systems with many lists; hence we better
# avoid to run that scan twice in a row.
# 
# The debconf template mailman/used_languages holds the result of the
# scan but is never presented to the user, instead its scanned flag
# indicates if it holds a fresh value and is reset by the postinst,
# while its seen flag is mainly used for cosmetical reasons to mark
# processed values in debconf-show output.

db_get mailman/used_languages || true
used_languages="${RET}"
db_fget mailman/used_languages scanned || true
scanned="${RET}"

if ! which list_lists >/dev/null 2>&1; then
  # For 1st time installers there is no used language.
  db_set  mailman/site_languages "en"
  db_set  mailman/used_languages ""
  db_fset mailman/used_languages scanned false
else
  if [ "${scanned}" != "true" ] ; then
    printf "Looking for enabled languages (this may take some time) ..."
    unset used_languages
    for l in $(get_used_languages); do
      used_languages=${used_languages:+${used_languages} }$l
    done
    db_set  mailman/used_languages "${used_languages}"
    db_fset mailman/used_languages scanned true
    db_fset mailman/used_languages seen false
    printf " done.\n"
  fi
  # Install only languages selected by the administrator
  # forcing used languages to be always available.
  db_get mailman/site_languages
  site_languages="$(echo $RET | sed -e 's/, */ /g' | sed -r 's/ \([^\)]*\)//g')"
  need_languages="${site_languages}"
  for lang in ${used_languages} ; do
    if echo " ${site_languages} " | grep -v -q " ${lang} " ; then
      need_languages="${lang} ${need_languages}"
    fi
  done
  if [ "${need_languages}" != "${site_languages}" ]; then
    db_set mailman/site_languages "$(echo ${need_languages} | sed -e 's/  */, /g')"
  fi
fi

site_languages=""
while [ -z "${site_languages}" ]; do
  db_input high mailman/site_languages || true
  # Let the db go, and ask the user, so we won't get back a stale setting
  db_go || true
  db_get mailman/site_languages && site_languages=${RET}
done
db_subst mailman/default_server_language site_languages "${site_languages}"
db_input high mailman/default_server_language || true

if [ ! -e /etc/mailman/mm_cfg.py ] || [ ! -x /var/lib/mailman/bin/list_lists ] || \
    [ "$(/var/lib/mailman/bin/list_lists -b | grep ^mailman$ )" = "" ]; then
    db_input critical mailman/create_site_list || true
fi

db_go || true