From 6a585950c5a014c35e449861b6b2040dca2d2516 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Fri, 27 Jul 2012 23:52:02 -0400 Subject: implement --moduleroot option This might be useful for creating an initramfs image as part of a kernel package. Signed-off-by: Dave Reisner --- functions | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'functions') diff --git a/functions b/functions index 9c577f0..b42daf7 100644 --- a/functions +++ b/functions @@ -212,7 +212,7 @@ auto_modules() { IFS=$'\n' read -rd '' -a mods < \ <(find /sys/devices -name modalias -exec sort -u {} + | # delimit each input by a newline, expanded in place - xargs -d $'\n' modprobe -qaRS "$KERNELVERSION" | + xargs -d $'\n' modprobe -d "$MODULEROOT" -qaRS "$KERNELVERSION" | sort -u) printf "%s\n" "${mods[@]//-/_}" @@ -332,7 +332,7 @@ add_module() { fi ;; esac - done < <(modinfo -k "$KERNELVERSION" -0 "$module" 2>/dev/null) + done < <(modinfo -b "$MODULEROOT" -k "$KERNELVERSION" -0 "$module" 2>/dev/null) if [[ -z $path ]]; then (( ign_errors )) && return 0 -- cgit v1.2.3-24-g4f1b