From 59c79bda956ccb309d21adfb5afcc19df77a8e0b Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Sat, 21 Sep 2013 18:47:53 -0400 Subject: autodetect: read modaliases from uevent files As suggested by Harald Hoyer, this is more accurate for the sake of following where udev gets its modaliases from. In some rare cases, it may even be more complete than scraping the raw modalias files. Also, introduce a wrapper around modprobe so that the options passed are never ommitted, or wrongly specified. In this case, a subtle bug with the -r flag is fixed due to using the wrong variable with modprobe's -d flag. Signed-off-by: Dave Reisner --- install/autodetect | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'install') diff --git a/install/autodetect b/install/autodetect index b3db536..37af3be 100644 --- a/install/autodetect +++ b/install/autodetect @@ -10,8 +10,7 @@ build() { # treat this as an alias, since ext3 might be aliased to ext4. also, as # of linux 3.9, we can find any filesystem by the alias "fs-$name" # rather than having to guess at the corresponding module name. - IFS=$'\n' read -rd '' -a resolved < \ - <(modprobe -d "$_optmoduleroot" -S "$KERNELVERSION" -Ra {fs-,}"$1" 2>/dev/null) + mapfile -t resolved < <(modprobe -Ra {fs-,}"$1" 2>/dev/null) for r in "${resolved[@]}"; do _autodetect_cache["$r"]=1 -- cgit v1.2.3-24-g4f1b