]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
dracut-functions.sh: skip comment lines in fstab
authorHarald Hoyer <harald@redhat.com>
Wed, 28 Mar 2012 09:09:46 +0000 (11:09 +0200)
committerHarald Hoyer <harald@redhat.com>
Wed, 28 Mar 2012 09:09:46 +0000 (11:09 +0200)
dracut-functions.sh

index 808246675c7ad57e2039303c6ddaea7706633459..8d31215d21aa7bbf32fe1cd8244a15d5c400a6eb 100755 (executable)
@@ -257,6 +257,8 @@ find_block_device() {
     fi
     # fall back to /etc/fstab
     while read _dev _mpt _fs _x; do
+        [ "${_dev%%#*}" != "$_dev" ] && continue
+
         if [[ $_mpt = $1 ]]; then
             [[ $_fs = nfs ]] && { echo $_dev; return 0;}
             [[ $_fs = nfs3 ]] && { echo $_dev; return 0;}