[Debian-eeepc-commits] [SCM] Maintenance of eeepc-acpi-scripts debian package branch, master, updated. 4050c9ce020568bfe5b498bcfe6877a193279aa2

Damyan Ivanov dmn at debian.org
Sun Mar 8 20:36:01 UTC 2009


The following commit has been merged in the master branch:
commit 4050c9ce020568bfe5b498bcfe6877a193279aa2
Author: Damyan Ivanov <dmn at debian.org>
Date:   Sun Mar 8 22:09:44 2009 +0200

    migrate etc/modprobe.d/eeepc to eeepc.conf

diff --git a/debian/preinst b/debian/preinst
new file mode 100644
index 0000000..25809df
--- /dev/null
+++ b/debian/preinst
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+set -e
+
+# Prepare to move a conffile without triggering a dpkg question
+prep_mv_conffile() {
+    CONFFILE="$1"
+
+    if [ -e "$CONFFILE" ]; then
+        md5sum="`md5sum \"$CONFFILE\" | sed -e \"s/ .*//\"`"
+        old_md5sum="`dpkg-query -W -f='${Conffiles}' eeepc-acpi-scripts | sed -n -e \"\\\\' $CONFFILE '{s/ obsolete$//;s/.* //p}\"`"
+        if [ "$md5sum" = "$old_md5sum" ]; then
+            rm -f "$CONFFILE"
+        fi
+    fi
+}
+
+case "$1" in
+    install|upgrade)
+        if dpkg --compare-versions "$2" le "1.0.11"; then
+            prep_mv_conffile "/etc/modprobe.d/eeepc"
+        fi
+    ;;
+
+    abort-upgrade)
+    ;;
+
+    *)
+        echo "preinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+#DEBHELPER#
+
+exit 0
+

-- 
Maintenance of eeepc-acpi-scripts debian package



More information about the Debian-eeepc-commits mailing list