[arch-projects] [mkinitcpio][PATCH 1/6] install/autodetect: avoid adding empty rootfstype

Dave Reisner d at falconindy.com
Sat Mar 3 17:47:39 EST 2012


Make the logic similar to how we treat usrfstype.

Signed-off-by: Dave Reisner <dreisner at archlinux.org>
---
 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
-- 
1.7.9.2



More information about the arch-projects mailing list