[PATCH] Resend: rm_conffile() /etc/modprobe.d/ipw3945 on upgrades
Loïc Minier
loic.minier at ubuntu.com
Wed Feb 18 09:46:05 UTC 2009
Hi
Back in gutsy, linux-restricted-modules-common used to ship a
/etc/modprobe.d/ipw3945 conffile. In hardy, this conffile wasn't
shipped anymore, but wasn't removed on upgrades. (The modprobe.d file
served starting a binary only daemon but ipw3945 is superseded by
iwlwifi which doesn't require one.)
The two patches below start a new release in jaunty-lrm and add a
postinst snippet to remove this conffile if it wasn't modified, or
rename it out of the way if it was. You can also get the patches from:
git://kernel.ubuntu.com/lool/ubuntu/ubuntu-jaunty-lrm.git
I did a test build and installed the new
linux-restricted-modules-common which removed the conffile on one of my
systems.
Cheers,
>From cf9ea08b34fdd883b80d9532231b8fa2454ce22a Mon Sep 17 00:00:00 2001
From: Loïc Minier <lool at dooz.org>
Date: Fri, 23 Jan 2009 12:12:32 +0100
Subject: [PATCH] UBUNTU: Start new release
Signed-off-by: Loïc Minier <lool at dooz.org>
---
debian/changelog | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 8144a8b..953c2e4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+linux-restricted-modules (2.6.28-5.6) UNRELEASED; urgency=low
+
+ CHANGELOG: Do not edit directly. Autogenerated at release.
+ CHANGELOG: Use the printchanges target to see the curent changes.
+ CHANGELOG: Use the insertchanges target to create the final log.
+
+ -- Loic Minier <lool at ubuntu.com> Fri, 23 Jan 2009 12:10:32 +0100
+
linux-restricted-modules (2.6.28-5.5) jaunty; urgency=low
* Bump ABI
--
1.6.0.4
>From ad67f0083deb519ec9545ecfd714bdbe48c8a2cb Mon Sep 17 00:00:00 2001
From: Loïc Minier <lool at dooz.org>
Date: Fri, 23 Jan 2009 12:39:16 +0100
Subject: [PATCH] UBUNTU: preinst: rm_conffile /etc/modprobe.d/ipw3945
Signed-off-by: Loïc Minier <lool at dooz.org>
---
debian/linux-restricted-modules-common.preinst | 28 ++++++++++++++++++++++++
1 files changed, 28 insertions(+), 0 deletions(-)
create mode 100644 debian/linux-restricted-modules-common.preinst
diff --git a/debian/linux-restricted-modules-common.preinst b/debian/linux-restricted-modules-common.preinst
new file mode 100644
index 0000000..8248013
--- /dev/null
+++ b/debian/linux-restricted-modules-common.preinst
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+set -e
+
+# Remove a no-longer used conffile
+rm_conffile() {
+ PKGNAME="$1"
+ CONFFILE="$2"
+ if [ -e "$CONFFILE" ]; then
+ md5sum="`md5sum \"$CONFFILE\" | sed -e \"s/ .*//\"`"
+ old_md5sum="`dpkg-query -W -f='${Conffiles}' $PKGNAME | sed -n -e \"\\\\' $CONFFILE '{s/ obsolete$//;s/.* //p}\"`"
+ if [ "$md5sum" != "$old_md5sum" ]; then
+ echo "Obsolete conffile $CONFFILE has been modified by you."
+ echo "Saving as $CONFFILE.dpkg-bak ..."
+ mv -f "$CONFFILE" "$CONFFILE".dpkg-bak
+ else
+ echo "Removing obsolete conffile $CONFFILE ..."
+ rm -f "$CONFFILE"
+ fi
+ fi
+}
+
+case "$1" in
+ install|upgrade)
+ rm_conffile linux-restricted-modules-common "/etc/modprobe.d/ipw3945"
+esac
+
+#DEBHELPER#
--
1.6.0.4
--
Loïc Minier
--
kernel-team mailing list
kernel-team at lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
More information about the kernel-team
mailing list