]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
mount-root: skip comments
authorHarald Hoyer <harald@redhat.com>
Thu, 18 Feb 2010 16:46:01 +0000 (17:46 +0100)
committerHarald Hoyer <harald@redhat.com>
Thu, 18 Feb 2010 16:46:01 +0000 (17:46 +0100)
modules.d/95rootfs-block/mount-root.sh

index 2b4c78560ec9252c6b5ea203a9364113413dd0d7..0ac156d6b889641ab19df51217cdd5583b6721f5 100755 (executable)
@@ -36,6 +36,9 @@ if [ -n "$root" -a -z "${root%%block:*}" ]; then
        rootfs="auto"
        rootopts="defaults"
        while read dev mp fs opts rest; do 
+            # skip comments
+            [ "${dev%%#*}" != "$dev" ] && continue
+            
             if [ "$mp" = "/" ]; then
                rootfs=$fs
                rootopts=$opts