[Pkg-utopia-commits] r267 - packages/unstable/hal/debian
Sjoerd Simons
sjoerd at costa.debian.org
Sun Aug 7 18:34:22 UTC 2005
Author: sjoerd
Date: 2005-08-07 18:34:21 +0000 (Sun, 07 Aug 2005)
New Revision: 267
Modified:
packages/unstable/hal/debian/hal.preinst
Log:
Remove /etc/dev.d/block/hal-unmount.dev if it's unchanged
Modified: packages/unstable/hal/debian/hal.preinst
===================================================================
--- packages/unstable/hal/debian/hal.preinst 2005-08-07 18:15:26 UTC (rev 266)
+++ packages/unstable/hal/debian/hal.preinst 2005-08-07 18:34:21 UTC (rev 267)
@@ -2,6 +2,32 @@
set -e
+# Remove a no-longer used conffile
+rm_conffile() {
+ CONFFILE="$1"
+ OLD_MD5="$2"
+
+ if [ -e "$CONFFILE" ]; then
+ md5sum="`md5sum \"$CONFFILE\" | sed -e \"s/ .*//\"`"
+ if [ "$md5sum" != "$OLD_MD5" ]; then
+ echo "Obsolete conffile $CONFFILE has been modified by you."
+ echo "Saving as $CONFFILE.dpkg-bak ..."
+ mv -f "$CONFFILE" "$CONFFILE".bak
+ else
+ echo "Removing obsolete conffile $CONFFILE ..."
+ rm -f "$CONFFILE"
+ fi
+ fi
+}
+
+case "$1" in
+install|upgrade)
+ if dpkg --compare-versions "$2" le "0.4.8-5"; then
+ rm_conffile "/etc/dev.d/block/hal-unmount.dev" \
+ "83e6af28225cd5d39b4efa24f1347c5b"
+ fi
+esac
+
if [ "$1" = "upgrade" ]; then
start-stop-daemon --quiet --stop --oknodo --exec /usr/sbin/hald
fi
More information about the Pkg-utopia-commits
mailing list