summaryrefslogtreecommitdiffstats
path: root/install/autodetect
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-02-27 19:41:47 +0100
committerDave Reisner <dreisner@archlinux.org>2012-02-27 19:41:47 +0100
commit1d67d47b66429a8acae14bd361c1d2ca949832b9 (patch)
treedc88db47fdad4373424e7a0f2fb44534c7c484bd /install/autodetect
parentbf6f07bfe75412c2f20b07dec5ca70a87ebeef70 (diff)
downloadmkinitcpio-1d67d47b66429a8acae14bd361c1d2ca949832b9.tar.gz
mkinitcpio-1d67d47b66429a8acae14bd361c1d2ca949832b9.tar.xz
install/autodetect: avoid adding empty rootfstype
Make the logic similar to how we treat usrfstype. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Diffstat (limited to 'install/autodetect')
-rw-r--r--install/autodetect10
1 files changed, 5 insertions, 5 deletions
diff --git a/install/autodetect b/install/autodetect
index 1b5b438..47c8c23 100644
--- a/install/autodetect
+++ b/install/autodetect
@@ -25,15 +25,15 @@ build() {
auto_modules >"$MODULE_FILE"
- if ! rootfstype=$(findmnt -uno fstype "${BASEDIR:-/}"); then
+ # detect filesystem for root
+ if rootfstype=$(findmnt -uno fstype "${BASEDIR:-/}"); then
+ add_if_avail "$rootfstype"
+ else
error "failed to detect root filesystem"
fs_autodetect_failed=1
fi
- # filesystem module might be a builtin
- add_if_avail "$rootfstype"
-
- # detect separate /usr
+ # detect filesystem for separate /usr
if usrfstype=$(findmnt -snero fstype --tab-file "$BASEDIR/etc/fstab" /usr); then
add_if_avail "$usrfstype"
fi