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