postinst is in junior-config 1.21.
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/junior/junior.conf ] ; then
echo "Debian Junior configuration file /etc/blends/junior/junior.conf is missing."
exit -1
fi
. /etc/blends/junior/junior.conf
# Source debconf library.
. /usr/share/debconf/confmodule
db_version 2.0
# If $USEUSERMENU is not set in /etc/blends/junior/junior.conf read it from debconf database
if [ -z $USEUSERMENU ] ; then
db_get shared/junior-config/useusermenus
if [ $RET ] ; then
USEUSERMENU="yes"
fi
fi
if [ "$USEUSERMENU" = "yes" ] ; then
db_get junior-config/group
CURRENTBLENDUSERS=`getUsersInRole junior junior 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 junior $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 junior | grep -c -w $user` -gt 0 ] ; then
blend-user del junior $user
fi
done
fi
|