2 # preinst script for blosxom
3 # copyright 2007-2008 by Gerfried Fuchs <rhonda@debian.at>
4 # Licenced in the same way as blosxom itself
11 if [ -e "$CONFFILE" ]; then
12 md5sum="`md5sum \"$CONFFILE\" | sed -e \"s/ .*//\"`"
13 old_md5sum="`dpkg-query -W -f='${Conffiles}' $PKGNAME | sed -n -e \"\\\\' $CONFFILE '{s/ obsolete$//;s/.* //p}\"`"
14 if [ "$md5sum" != "$old_md5sum" ]; then
15 echo "Obsolete conffile $CONFFILE has been modified by you."
16 echo "Saving as $CONFFILE.dpkg-bak ..."
17 mv -f "$CONFFILE" "$CONFFILE".dpkg-bak
19 echo "Removing obsolete conffile $CONFFILE ..."
26 # cleanup for old flavors that got installed by packages prior to 2.1.0
29 if dpkg --compare-versions "$2" le-nl "2.1.0-1"; then
30 for i in content_type.1993 content_type.html content_type.index \
31 date.1993 date.html date.index \
32 foot.1993 foot.html foot.index \
33 head.1993 head.html head.index \
34 story.1993 story.html story.index ; do
35 rm_conffile blosxom "/etc/blosxom/flavours/$i"
37 rm_conffile blosxom "/etc/blosxom/plugins/timezone"
39 if [ -d /var/lib/blosxom/data/flavours ] ; then
40 cd /var/lib/blosxom/data/flavours
41 for i in content_type.1993 content_type.html content_type.index \
42 date.1993 date.html date.index \
43 foot.1993 foot.html foot.index \
44 head.1993 head.html head.index \
45 story.1993 story.html story.index ; do
46 test ! -L $i || test -f $i || rm $i