preinst is in libpam-radius-auth 1.3.17-0ubuntu3.
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 | #!/bin/sh
action=$1
version=$2
if [ "$action" = upgrade ] && dpkg --compare-versions "$version" lt 1.3.16-1.1 && [ `find /etc/pam_radius_auth.conf -printf %m 2> /dev/null` = '644' ]
then
# check if debconf is missing
if ! test -f /usr/share/debconf/confmodule
then
cat <<EOF
Older versions of libpam-radius-auth installed the /etc/pam_radius_auth.conf
file with incorrect permissions. Should these permissions be corrected? (I
strongly recommend doing this)
EOF
echo -n "Make /etc/pam_radius_auth.conf readable only by root? [Yn]: "
read input
expr "$input" : '[Nn]' >/dev/null || chmod 600 /etc/pam_radius_auth.conf
else
# Source debconf library.
. /usr/share/debconf/confmodule
db_version 2.0
db_get libpam-radius-auth/fixmodes
if [ "$RET" != "false" ]; then
chmod 600 /etc/pam_radius_auth.conf
fi
fi
fi
|