This file is indexed.

config is in mdadm 3.2.5-5ubuntu4.

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
#!/bin/sh
# Copyright © 2001-2004 Mario Jou/3en <joussen@debian.org>
# Copyright © martin f. krafft <madduck@debian.org>
# Distributable under the terms of the GNU GPL version 2.
#

# we need debconf-escape. Without it, defer the configuration.
if [ ! -x "$(command -v debconf-escape 2>/dev/null)" ]; then
  echo 'I: mdadm: debconf backend too old, defering configuration...' >&2
  exit 0
fi

. /usr/share/debconf/confmodule
# see #369953 for ordering
set -eu

CONFIG=/etc/mdadm/mdadm.conf
ALTCONFIG=/etc/mdadm.conf
[ ! -f $CONFIG ] && [ -f $ALTCONFIG ] && CONFIG=$ALTCONFIG

DEBIANCONFIG=/etc/default/mdadm
DEBIANCONFIG_OLD=/etc/mdadm/debian.conf

if [ ! -e "$DEBIANCONFIG" ]; then
  if [ -e "$DEBIANCONFIG_OLD" ]; then
    DEBIANCONFIG="$DEBIANCONFIG_OLD"
  fi
fi

db_get mdadm/initrdstart || :
INITRDSTART="$RET"

if [ -s $DEBIANCONFIG ] ; then
  AUTOCHECK=true
  START_DAEMON=true
  MAILADDR=root

  [ -f $DEBIANCONFIG ] && . $DEBIANCONFIG
  if [ -f $CONFIG ]; then
    MAILADDR=$(sed -rne 's/^MAILADDR[[:space:]]*([^[:space:]]+).*/\1/p' $CONFIG)
  fi

  # if $MAIL_TO from $DEBIANCONFIG is set, give it priority. This is because
  # it was used in the command line invocation of the mdadm monitor, and thus
  # overruled any existing setting in /etc/mdadm/mdadm.conf.
  # There's a slight chance of loss of a configuration setting (MAILADDR in
  # /etc/mdadm/mdadm.conf), but it's only an email address, and it is likely
  # unused anyway, thus we run the risk.
  [ -n "${MAIL_TO:-}" ] && MAILADDR="$MAIL_TO"

  [ -n "$AUTOCHECK" ] && db_set mdadm/autocheck "$AUTOCHECK"
  [ -n "$START_DAEMON" ] && db_set mdadm/start_daemon "$START_DAEMON"
  [ -n "$MAILADDR" ] && db_set mdadm/mail_to "$MAILADDR"
fi

db_capb escape

db_input medium mdadm/autocheck || :
db_go

db_input medium mdadm/start_daemon || :
db_go

db_get mdadm/start_daemon || :
if [ "$RET" = true ]; then
  db_input medium mdadm/mail_to || :
  db_go
fi