This file is indexed.

postinst is in med-config 3.0.1ubuntu1.

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

# if blends-common package is not yet installed we have to stop here
if [ ! -f /etc/blends/blends.conf ] ; then
   echo "Debian Pure Blends configuration file /etc/blends/blends.conf is missing."
   exit 1
fi
. /etc/blends/blends.conf

if [ ! -f /etc/blends/med/med.conf ] ; then
   echo "Debian Med configuration file /etc/blends/med/med.conf is missing."
   exit 1
fi
. /etc/blends/med/med.conf

# Source debconf library.
. /usr/share/debconf/confmodule
db_version 2.0

# If $USEUSERMENU is not set in /etc/blends/med/med.conf read it from debconf database
if [ -z $USEUSERMENU ] ; then
    db_get shared/med-config/useusermenus
    if [ $RET ] ; then
	USEUSERMENU="yes"
    fi
fi

if [ "$USEUSERMENU" = "yes" ] ; then
    db_get med-config/group 

    CURRENTBLENDUSERS=`getUsersInRole med med 1`
    # Add those users which were selected but are not yet in the group
    for user in `echo "$RET" | sed "s/([^)]*)//g" | sed "s/ //g" |  tr ',' '\n'` ; do
	if [ `echo "${CURRENTBLENDUSERS}" | grep -c -w "$user"` -eq 0 ] ; then
	    blend-user add med $user
	fi
    done
    # Del those users which were obviousely removed from list of Blend users
    for user in `getAllUsers 1` ; do
	if [ `echo "$RET" | grep -c -w "$user"` -eq 0 ] && [ `getent group med | grep -c -w $user` -gt 0 ] ; then
	    blend-user del med $user
	fi
    done
fi