This file is indexed.

preinst is in drizzle 2011.03.13-0ubuntu5.

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
#!/bin/bash
#
# summary of how this script can be called:
#        * <new-preinst> install
#        * <new-preinst> install <old-version>
#        * <new-preinst> upgrade <old-version>
#        * <old-preinst> abort-upgrade <new-version>
#

set -e

DATADIR=/var/lib/drizzle
LOGDIR=/var/log/drizzle

# creating drizzle group if it isn't already there
if ! getent group drizzle >/dev/null; then
        # Adding system group: drizzle.
        addgroup --system drizzle >/dev/null
fi

# creating drizzle user if it isn't already there
if ! getent passwd drizzle >/dev/null; then
        # Adding system user: drizzle.
        adduser \
          --system \
          --disabled-login \
          --ingroup drizzle \
          --home $DATADIR \
          --gecos "Drizzle Server" \
          --shell /bin/false \
          drizzle  >/dev/null
fi

# Its possible drizzled was running as root before
if [ "$1" = "upgrade" ] && \
     dpkg --compare-versions "$2" lt "2011.03.13-0ubuntu2" && \
     [ -d $DATADIR ] ; then
  chown -R drizzle:drizzle $DATADIR
fi

if [ ! -d $LOGDIR ]; then
  mkdir $LOGDIR
  chown drizzle:drizzle $LOGDIR
fi

# Automatically added by dh_installinit
if [ "$1" = install ] || [ "$1" = upgrade ]; then
	if [ -e "/etc/init.d/drizzle" ] && [ ! -L "/etc/init.d/drizzle" ]; then
		if [ "`md5sum \"/etc/init.d/drizzle\" | sed -e \"s/ .*//\"`" != \
		     "`dpkg-query -W -f='${Conffiles}' drizzle | sed -n -e \"\\\\' /etc/init.d/drizzle '{s/ obsolete$//;s/.* //p}\"`" ]
		then
			echo "Obsolete conffile /etc/init.d/drizzle has been modified by you, renaming to .dpkg-bak"
			mv -f "/etc/init.d/drizzle" "/etc/init.d/drizzle.dpkg-bak"
		else
			rm -f "/etc/init.d/drizzle"
		fi
	fi
fi
# End automatically added section


exit 0