On Tue, Dec 23, 2008 at 03:34:26PM +0100, Marco d'Itri wrote:
> On Dec 23, Marc Haber <[email protected]> wrote:
> > I have a test setup for etch => lenny updates and can therefore
> > reproduce the issue to help finding out what exactly is going wrong.
> Please do, because I have been lost for a long time in the mess of the
> m-i-t diversions...
This code removes all diversions belonging to modutils from the system
"the hard way" and allow module-init-tools to be updated on the test
system. I cannot comment on whether it may be suitable for inclusion
into the package. Use at your own risk.
The rm/ln code for /sbin/insmod(.modutils) may be a fix for local
issue on my system where /sbin/insmod.modutils was a zero bytes file.
I don't know why dpkg-divert checks whether the file is a hard-link
before renaming, but that seemed to be necessary.
Greetings
Marc
#!/bin/bash
rm -f /sbin/insmod.modutils
ln /sbin/insmod /sbin/insmod.modutils
for file in /sbin/depmod /sbin/insmod /sbin/update-modules /sbin/modinfo \
/sbin/kallsyms /sbin/ksyms; do
echo "dpkg-divert --remove --rename --package module-init-tools --divert
$file.modutils $file"
dpkg-divert --remove --rename --package module-init-tools --divert
$file.modutils $file
done
for file in /sbin/lsmod /sbin/modprobe /sbin/rmmod ; do
echo "dpkg-divert --remove --rename --package module-init-tools --divert
$file.Lmodutils $file"
dpkg-divert --remove --rename --package module-init-tools --divert
$file.Lmodutils $file
done
for file in /usr/share/man/man8/depmod.8.gz \
/usr/share/man/fr/man8/depmod.8.gz \
/usr/share/man/man8/insmod.8.gz /usr/share/man/fr/man8/insmod.8.gz \
/usr/share/man/man8/update-modules.8.gz \
/usr/share/man/fr/man8/update-modules.8.gz \
/usr/share/man/man8/modinfo.8.gz /usr/share/man/fr/man8/modinfo.8.gz \
/usr/share/man/man8/lsmod.8.gz /usr/share/man/fr/man8/lsmod.8.gz \
/usr/share/man/man8/modprobe.8.gz /usr/share/man/fr/man8/modprobe.8.gz \
/usr/share/man/man8/rmmod.8.gz /usr/share/man/fr/man8/rmmod.8.gz \
/usr/share/man/man5/modules.5.gz /usr/share/man/fr/man5/modules.5.gz; do
DIVERTED="$(echo $file | sed
's/\(.*\)\(\.[[:digit:]]\+\.gz\)$/\1.modutils\2/')"
echo "dpkg-divert --remove --rename --package module-init-tools --divert
$DIVERTED $file"
dpkg-divert --remove --rename --package module-init-tools --divert $DIVERTED
$file
done
--
-----------------------------------------------------------------------------
Marc Haber | "I don't trust Computers. They | Mailadresse im Header
Mannheim, Germany | lose things." Winona Ryder | Fon: *49 621 72739834
Nordisch by Nature | How to make an American Quilt | Fax: *49 3221 2323190
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]