From 85f8bb16b235d4bdab2bac89209e1378fa25b0cb Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 28 Mar 2012 11:09:46 +0200 Subject: [PATCH] dracut-functions.sh: skip comment lines in fstab --- dracut-functions.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dracut-functions.sh b/dracut-functions.sh index 8082466..8d31215 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;} -- 2.7.4