From 1d67d47b66429a8acae14bd361c1d2ca949832b9 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Mon, 27 Feb 2012 13:41:47 -0500 Subject: install/autodetect: avoid adding empty rootfstype Make the logic similar to how we treat usrfstype. Signed-off-by: Dave Reisner --- install/autodetect | 10 +++++----- 1 file 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 -- cgit v1.2.3-24-g4f1b