This file is indexed.

postinst is in dnet-common 2.58ubuntu1.

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

set -e

if [ "$1" != "configure" ]
then
  exit 0
fi

. /usr/share/debconf/confmodule

db_get dnet-common/configure-action
configure_action=$RET

# Get the node name and address
db_get dnet-common/nodename
name=$RET
db_get dnet-common/nodeaddr
addr=$RET

db_stop

# Update /etc/decnet.conf
if [ "$configure_action" = 'configure now' ]
then
  if [ ! -f /etc/decnet.conf ] 
  then
    cp /usr/share/doc/dnet-common/decnet.conf.sample /etc/decnet.conf
    chmod 0644 /etc/decnet.conf
  fi

  TMPFILE="`tempfile`"

  cat /etc/decnet.conf | awk -v NAME=$name -vADDR=$addr '
  { if ($1 == "executor") { printf("executor\t%s\t\tname\t\t%s\tline\teth0\n", ADDR, NAME) ;} else { print $0; } }' > $TMPFILE

  cp /etc/decnet.conf /etc/decnet.conf.old
  cp $TMPFILE /etc/decnet.conf
  if [ $? -ne 0 ]
  then
    cp /etc/decnet.conf.old /etc/decnet.conf
  fi

  rm -f $TMPFILE
fi

# Automatically added by dh_installinit
if [ -x "/etc/init.d/decnet" ]; then
	if [ ! -e "/etc/init/decnet.conf" ]; then
		update-rc.d decnet start 39 S .  stop 11 1 . >/dev/null
	fi
	invoke-rc.d decnet start || exit $?
fi
# End automatically added section