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 8082466..8d31215 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;}