preinst is in perl-modules 5.18.2-2ubuntu1.7.
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 | #!/bin/sh -e
# /etc/perl/Net/libnet.cfg mistakenly installed as /etc/Net in perl 5.8
if [ "$1" = upgrade ] && [ -f /etc/Net ] && which md5sum > /dev/null &&
[ "$(md5sum /etc/Net)" = "fb2946cae573b8ed3d654a180d458733 /etc/Net" ]
then
rm -f /etc/Net
fi
# this used to be a symlink, see #536384
if [ -h /usr/share/doc/perl-modules ]; then
rm -f /usr/share/doc/perl-modules
fi
# cpanp used to save its configuration to /usr/share
# the md5sum corresponds to the file we ship from 5.10.0-24 onwards
if [ "$1" = upgrade ] &&
[ -f /usr/share/perl/5.10.0/CPANPLUS/Config/System.pm ] &&
[ ! -e /etc/perl/CPANPLUS/Config/System.pm ] &&
[ "$(md5sum /usr/share/perl/5.10.0/CPANPLUS/Config/System.pm)" != \
"a8e8f612c37f8a5d1b73ebf5bd4e4473 /usr/share/perl/5.10.0/CPANPLUS/Config/System.pm" ]
then
if [ -d /etc/perl/CPANPLUS/Config ] || mkdir -p /etc/perl/CPANPLUS/Config
then
mv /usr/share/perl/5.10.0/CPANPLUS/Config/System.pm \
/etc/perl/CPANPLUS/Config/System.pm || true
rmdir /usr/share/perl/5.10.0/CPANPLUS/Config || true
fi
fi
exit 0
|