preinst is in owfs-common 3.1p5-2.
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 | #!/bin/sh
set -e
last=
for i in $(ls /etc/modprobe.d/libow-*-*.conf 2>/dev/null)
do
if test "$(md5sum < "$i")" \
!= "9c0ce25c8de4426c2dff7738ccf67f96 -"; then
# a file has been modified. We will keep it.
last="$i".dpkg-old
fi
# removing old config files for previous ow libraries
# (they will be really removed when the package will be purged)
mv "$i" "$i".dpkg-old
done
if [ -n "$last" ]; then
# We try to keep user modifications
cp -a "$last" /etc/modprobe.d/libow-common.conf
fi
|