This file is indexed.

preinst is in tango-common 7.2.6+dfsg-4build2.

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

DATADIR=/var/lib/tango



# If we use NIS then errors should be tolerated. It's up to the
# user to ensure that the tango user is correctly setup.
# Beware that there are two ypwhich one of them needs the 2>/dev/null!
if test -n "`which ypwhich 2>/dev/null`"  &&  ypwhich >/dev/null 2>&1; then
  set +e
fi

#
# Now we have to ensure the following state:
# /etc/passwd: tango:x:100:101:Tango Server:/var/lib/tango:/bin/false
# /etc/group:  tango:x:101:
# 
# Sadly there could any state be present on the system so we have to
# modify everything carefully i.e. not doing a chown before creating
# the user etc...
#

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

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

# end of NIS tolerance zone
set -e