preinst is in cdebconf 0.213ubuntu1.
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 | #!/bin/sh
set -e
debconfdir="/var/cache/debconf"
cdebconfdir="/var/lib/cdebconf"
if [ ! -d $cdebconfdir ]; then
mkdir -p $cdebconfdir
fi
if [ -f $debconfdir/templates.dat -a ! -f $cdebconfdir/templates.dat ]; then
cp $debconfdir/templates.dat $debconfdir/templates.dat.old
mv $debconfdir/templates.dat $cdebconfdir/templates.dat
ln -s $cdebconfdir/templates.dat $debconfdir/templates.dat
fi
if [ -f $debconfdir/config.dat -a ! -f $cdebconfdir/questions.dat ]; then
cp $debconfdir/config.dat $debconfdir/config.dat.old
mv $debconfdir/config.dat $cdebconfdir/questions.dat
ln -s $cdebconfdir/questions.dat $debconfdir/config.dat
fi
if [ -f $debconfdir/passwords.dat -a ! -f $cdebconfdir/passwords.dat ]; then
cp $debconfdir/passwords.dat $debconfdir/passwords.dat.old
mv $debconfdir/passwords.dat $cdebconfdir/passwords.dat
ln -s $cdebconfdir/passwords.dat $debconfdir/passwords.dat
fi
|