From: Harald Hoyer Date: Wed, 28 Mar 2012 09:09:46 +0000 (+0200) Subject: dracut-functions.sh: skip comment lines in fstab X-Git-Tag: 018~27 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=85f8bb16b235d4bdab2bac89209e1378fa25b0cb;p=thirdparty%2Fdracut.git dracut-functions.sh: skip comment lines in fstab --- diff --git a/dracut-functions.sh b/dracut-functions.sh index 808246675..8d31215d2 100755 --- a/dracut-functions.sh +++ b/dracut-functions.sh @@ -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;}