This file is indexed.

postinst is in ushare 1.1a-0ubuntu10.

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
#!/bin/sh
CONFIGFILE=/etc/ushare.conf

set -e
. /usr/share/debconf/confmodule

update_conf() {
  VARIABLE=$1
  VAL=$2
  sed -i -e "s%^[[:space:]]*$VARIABLE=.*%$VARIABLE=$VAL%" $CONFIGFILE
}

if [ ! -e $CONFIGFILE ]; then
  install -m 644 /usr/share/ushare/ushare.conf $CONFIGFILE
fi

db_get ushare/name
update_conf USHARE_NAME "$RET"

db_get ushare/iface
update_conf USHARE_IFACE "$RET"

db_get ushare/share
update_conf USHARE_DIR "$RET"

# Automatically added by dh_installinit
if [ -x "/etc/init.d/ushare" ] || [ -e "/etc/init/ushare.conf" ]; then
	if [ ! -e "/etc/init/ushare.conf" ]; then
		update-rc.d ushare defaults 80 20 >/dev/null
	fi
	invoke-rc.d ushare start || exit $?
fi
# End automatically added section