diff options
-rw-r--r-- | install/autodetect | 7 |
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}/* | |