MODULES=dep does not handle modprobe install directives
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
initramfs-tools (Debian) |
Fix Released
|
Unknown
|
|||
initramfs-tools (Ubuntu) |
Invalid
|
Medium
|
Unassigned |
Bug Description
manual_add_modules blindly assumes that modprobe returns "insmod <path> [<options>]". However, the default alsa configuration for ubuntu overrides the install command for snd and some related modules. The install directives are printed verbatim by modprobe, causing several problems:
1) the second word is "modprobe", so an invalid link to modprobe is created in / on the initrd. This could easily be fixed by filtering modprobe's output with "grep '^insmod'".
2) naturally, any activity done by the install command is ignored.
I'd like to see #1 fixed. #2 is harder, and can wait. It's impossible to get #2 truly right, since install commands are arbitrary, but a good compromise would be to parse out "modprobe" words, and find the next non-option argument after that word. Unfortunately, I can't think of a way to do this in the shell without either creating an infinite loop or introducing a global variable:
printed_modules=
mod_dep() {
modprobe --show-depends "$@" 2>/dev/null | while read x y z; do
if [ install = "$x" ]; then
dump_install "$y $z"
elif [ insmod = "$x" ]; then
echo $y
fi
done | sort -u
}
dump_install() {
set -- `echo "$1"`
while [ $# -gt 0 ]; do
case "$1" in
modprobe|
shift
while [ "x${1#-}" != "x$1" -a $# -gt 0 ]; do
shift
done
if [ $# -gt 0 -a "${printed_
mod_dep --ignore-install "$1"
fi
;;
esac
shift
done
}
Changed in initramfs-tools: | |
assignee: | nobody → adconrad |
Changed in initramfs-tools: | |
assignee: | adconrad → nobody |
Changed in initramfs-tools: | |
status: | Unknown → Fix Released |
Source: initramfs-tools
Source-Version: 0.50c
We believe that the bug you reported is fixed in the latest version of
initramfs-tools, which is due to be installed in the Debian FTP archive:
initramfs- tools_0. 50c.dsc i/initramfs- tools/initramfs -tools_ 0.50c.dsc tools_0. 50c.tar. gz i/initramfs- tools/initramfs -tools_ 0.50c.tar. gz tools_0. 50c_all. deb i/initramfs- tools/initramfs -tools_ 0.50c_all. deb
to pool/main/
initramfs-
to pool/main/
initramfs-
to pool/main/
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to <email address hidden>,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
maximilian attems <email address hidden> (supplier of updated initramfs-tools package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing <email address hidden>)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.7 local-top/ evms: EVMS takes care of it's own hooks, rm. 3860a87eb27f9d1 7d8 631 utils optional initramfs- tools_0. 50c.dsc 5183bfaaf012c86 861 30485 utils optional initramfs- tools_0. 50c.tar. gz 4cd3d61cbe3c0b2 0cb 35346 utils optional initramfs- tools_0. 50c_all. deb
Date: Sat, 14 Jan 2006 17:40:48 +0100
Source: initramfs-tools
Binary: initramfs-tools
Architecture: source all
Version: 0.50c
Distribution: unstable
Urgency: low
Maintainer: Debian kernel team <email address hidden>
Changed-By: maximilian attems <email address hidden>
Description:
initramfs-tools - tools for generating an initramfs
Closes: 340258 342616
Changes:
initramfs-tools (0.50c) unstable; urgency=low
.
"E so io muoio da partigiano"
.
* hook-functions: Fix MODULES=dep as `modprobe --show-depends' prints not
only the insmod commands, but also the install ones. Thanks for the patch
to Jean Charles Delepine <email address hidden>. (Closes: #342616)
.
* hooks/evms, scripts/
Thanks Steinar H. Gunderson <email address hidden>. (Closes: 340258)
Files:
fc78a9e180f98a
5977d3ed14b0a4
5f11ac451cd222
-----BEGIN PGP SIGNATURE-----
Q3lK3SH4RAnc0AJ 0XrGoM0gW1pB4mB NA3l81Fqdc4mwCf T0nZ ZY+ped2o=
Version: GnuPG v1.4.2 (GNU/Linux)
iD8DBQFDyY9iXKR
7cXgBCXkSscdsDH
=NtOH
-----END PGP SIGNATURE-----