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
|
package=`basename $0 .postinst`
config="/etc/hwtest.d/$package.ini"
case "$1" in
configure)
# Workaround python-support which doesn't remove packages
# under /usr/lib/python*
for support_dir in python2.4 python2.5; do
package_dir="/usr/lib/$support_dir/site-packages/$package"
[ -e "$package_dir" ] && rm -fr $package_dir
done
# Create a temporary file to generate the suggested
# configuration file.
tempfile=`tempfile -m 0644 -p hwtest`
# Update the temporary file with preseeded values.
/usr/share/hwtest/install/config --output=$tempfile $package
# Invoke ucf, which will take care of the rest, and ask
# the user if he wants to update his file, if it is modified.
[ -e "$config" ] && ucf $tempfile $config || cp $tempfile $config
# Now clear up the cruft.
rm -f $tempfile
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "$0: didn't understand being called with \`$1'" 1>&2
exit 0
;;
esac
|