This file is indexed.

postinst is in inn 1:1.7.2q-41build1.

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
#!/bin/sh -e

make_directories() {
  NEED_DIR='in.coming in.coming/bad in.coming/tmp
	out.going over.view news.archive'
  for D in $NEED_DIR; do
    if [ ! -d /var/spool/news/$D ]; then
      install -d -m 775 -o news -g news /var/spool/news/$D
    fi
  done
}

init_var_lib_news() {
  if [ ! -f /var/lib/news/active ]; then
    cat > /var/lib/news/active << END
control 0000000000 0000000001 n
control.cancel 0000000000 0000000001 n
junk 0000000000 0000000001 y
misc.test 0000000000 0000000001 y
misc.test.moderated 0000000000 0000000001 m
END
    chown news:news /var/lib/news/active
  fi

  if [ ! -f /var/lib/news/history ]; then
    touch /var/lib/news/history
    /usr/lib/news/bin/makehistory -or
    chown news:news /var/lib/news/history*
  fi

  if [ ! -f /var/lib/news/newsgroups ]; then
    cat > /var/lib/news/newsgroups << END
control		News server internal group.
control.cancel	News server internal group.
junk		News server internal group.
misc.test	For testing of network software.  Very boring.
misc.test.moderated	Testing of posting to moderated groups. (Moderated)
END
    chown news:news /var/lib/news/newsgroups
  fi
}

add_mail_alias() {
  if ! grep -q '^usenet:' /etc/aliases; then
    echo 'usenet: root' >> /etc/aliases
    newaliases || echo "newaliases command not available."
  fi
}

init_etc_files() {
  if [ ! -f /etc/news/server ]; then
    echo 'localhost' > /etc/news/server
  fi

  if [ ! -f /etc/news/whoami ]; then
    if [ -f /etc/mailname ]; then
      cp /etc/mailname /etc/news/whoami
    else
      hostname --fqdn > /etc/news/whoami
    fi
  fi
}

case "$1" in
    configure)
    make_directories
    init_var_lib_news
    add_mail_alias
    init_etc_files
    ;;

    abort-upgrade|abort-remove|abort-deconfigure)
    ;;

    *)
    echo "postinst called with unknown argument '$1'" >&2
    exit 1
    ;;
esac

# Automatically added by dh_installinit
if [ -x "/etc/init.d/inn" ] || [ -e "/etc/init/inn.conf" ]; then
	if [ ! -e "/etc/init/inn.conf" ]; then
		update-rc.d inn defaults >/dev/null
	fi
	if [ -n "$2" ]; then
		_dh_action=restart
	else
		_dh_action=start
	fi
	invoke-rc.d inn $_dh_action || exit $?
fi
# End automatically added section