summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Borzenkov <arvidjaar@mail.ru>2010-05-09 22:23:58 +0400
committerHarald Hoyer <harald@redhat.com>2010-08-04 18:30:02 +0200
commit62f8a2b63cdf71e70a6ba723fce869ea769d01ad (patch)
tree2e7e6a0854fca6582234a9cda72ffd24f97dcc1b
parenta0342347e9241cd1899404131e196043931054f4 (diff)
downloaddracut-62f8a2b63cdf71e70a6ba723fce869ea769d01ad.tar.gz
dracut-62f8a2b63cdf71e70a6ba723fce869ea769d01ad.tar.bz2
dracut-62f8a2b63cdf71e70a6ba723fce869ea769d01ad.zip
Harden check for used modules in hostonly mode
Make sure that we do not accept module name which is substring of some other module name. This resulted in piix being mistakenly loaded together with ata_piix. It completely broke DVD access here. Signed-off-by: Andrey Borzenkov <arvidjaar@mail.ru>
-rwxr-xr-xdracut-functions2
1 files changed, 1 insertions, 1 deletions
diff --git a/dracut-functions b/dracut-functions
index a1873c5d..c9affc74 100755
--- a/dracut-functions
+++ b/dracut-functions
@@ -657,7 +657,7 @@ instmods() {
[[ -f $initdir/$1 ]] && { shift; continue; }
# If we are building a host-specific initramfs and this
# module is not already loaded, move on to the next one.
- [[ $hostonly ]] && ! grep -q "${mod//-/_}" /proc/modules && \
+ [[ $hostonly ]] && ! grep -qe "\<${mod//-/_}\>" /proc/modules && \
! echo $add_drivers | grep -qe "\<${mod}\>" && {
shift; continue;
}