postinst is in freeradius-config 3.0.16+dfsg-1ubuntu3.
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 | #!/bin/sh
# vim:ts=2:sw=2:et
set -e
case "$1" in
configure)
if [ -z "$2" ]; then
# Create snakeoil certificates on initial install
if grep -q -r 'etc/ssl/\(certs\|private\)/ssl-cert-snakeoil' /etc/freeradius; then
if test ! -e /etc/ssl/certs/ssl-cert-snakeoil.pem || \
test ! -e /etc/ssl/private/ssl-cert-snakeoil.key; then
make-ssl-cert generate-default-snakeoil
fi
if getent group ssl-cert >/dev/null; then
# freeradius-common dependency also provides us with adduser
adduser --quiet freerad ssl-cert
fi
fi
if grep -q -r 'dh_file = \${certdir}/dh' /etc/freeradius && \
test ! -f /etc/freeradius/3.0/certs/dh; then
RANDFILE=/dev/urandom openssl dhparam -out /etc/freeradius/3.0/certs/dh 1024
fi
fi
# Create links for default sites, but only if this is an initial
# install or an upgrade from before there were links; users may
# want to remove them...
if [ -z "$2" ] || dpkg --compare-versions "$2" lt 2.0.4+dfsg-4; then
for site in default inner-tunnel; do
if test ! -h /etc/freeradius/3.0/sites-enabled/$site && \
test ! -e /etc/freeradius/3.0/sites-enabled/$site; then
ln -s ../sites-available/$site /etc/freeradius/3.0/sites-enabled/$site
fi
done
fi
if [ -z "$2" ] || dpkg --compare-versions "$2" lt 3.0.12+dfsg-2; then
for module in always attr_filter cache_eap chap detail detail.log \
digest dynamic_clients eap echo exec expiration expr files \
linelog logintime mschap ntlm_auth pap passwd preprocess \
radutmp realm replicate soh sradutmp unix unpack utf8; do
if test ! -h /etc/freeradius/3.0/mods-enabled/$module && \
test ! -e /etc/freeradius/3.0/mods-enabled/$module; then
ln -s ../mods-available/$module /etc/freeradius/3.0/mods-enabled/$module
fi
done
fi
;;
esac
exit 0
|