summaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-01-01 20:53:20 +0100
committerDave Reisner <dreisner@archlinux.org>2012-01-05 01:08:46 +0100
commit09af3c9bf3e549edc650c41393ed6bdbb56a8248 (patch)
treec6ddae0c20a71c9fc5da3ebd0a16da2e246ceadb /install
parent3602a8e80cc1866f2d4215a95d5627163654b2dc (diff)
downloadmkinitcpio-09af3c9bf3e549edc650c41393ed6bdbb56a8248.tar.gz
mkinitcpio-09af3c9bf3e549edc650c41393ed6bdbb56a8248.tar.xz
autodetect: check for rootfs module existance
Avoiding adding a filesystem module to the whitelist when it doesn't actually exist as a module (in case its compiled in staticly). Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Diffstat (limited to 'install')
-rw-r--r--install/autodetect7
1 files changed, 6 insertions, 1 deletions
diff --git a/install/autodetect b/install/autodetect
index c787fcb..abc0fa0 100644
--- a/install/autodetect
+++ b/install/autodetect
@@ -10,11 +10,16 @@ build() {
auto_modules | grep -xEv '(ata|ide)_generic' >"$MODULE_FILE"
- if ! rootfstype=$(findmnt -uno fstype "${BASEDIR:-/}" | tee -a "$MODULE_FILE"); then
+ if ! rootfstype=$(findmnt -uno fstype "${BASEDIR:-/}"); then
error "failed to detect root filesystem"
fs_autodetect_failed=1
fi
+ # filesystem module might be a builtin
+ if modinfo -k "$KERNELVERSION" "$rootfstype" &>/dev/null; then
+ printf '%s\n' "$rootfstype" >>"$MODULE_FILE"
+ fi
+
if (( UID == 0 )) || in_array 'disk' $(groups); then
if [[ -x $(type -P mdadm) ]]; then
mdadm -Esv /dev/[hrsv]d* /dev/{ida,cciss,ataraid,mapper}/* |