From 62f8a2b63cdf71e70a6ba723fce869ea769d01ad Mon Sep 17 00:00:00 2001 From: Andrey Borzenkov Date: Sun, 9 May 2010 22:23:58 +0400 Subject: 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 --- dracut-functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- cgit v1.2.3