Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 406023 - sys-kernel/dracut: usrmount chokes on comments in fstab, where the 2nd word is /usr
Summary: sys-kernel/dracut: usrmount chokes on comments in fstab, where the 2nd word i...
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Amadeusz Żołnowski (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-27 11:52 UTC by Amadeusz Żołnowski (RETIRED)
Modified: 2012-03-13 22:32 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Make usrmount skip comments in fstab (dracut-016-usrmount-comments.diff,489 bytes, patch)
2012-02-27 12:09 UTC, Dennis Schridde
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Amadeusz Żołnowski (RETIRED) gentoo-dev 2012-02-27 11:52:04 UTC
dracut's usrmount chokes on comments in fstab, where the 2nd word is /usr


Reproducible: Always
Comment 1 Dennis Schridde 2012-02-27 12:09:25 UTC
Created attachment 303493 [details, diff]
Make usrmount skip comments in fstab

Patch as submitted to initramfs on kernel.org: http://thread.gmane.org/gmane.linux.kernel.initramfs/2496
Comment 2 Ulenrich 2012-02-28 16:58:28 UTC
@Dennis, patch well done, for me.
Comment 3 Dennis Schridde 2012-02-28 18:04:16 UTC
(In reply to comment #2)
> @Dennis, patch well done, for me.
Thanks!

On initramfs@ I added the remark that the patch is dodgy, because I requires the # comment to be the first character on a line. This is not true if IFS contains the usual whitespaces, in which case read will already strip whitespace. So the patch should be safe for all cases.
Comment 4 Amadeusz Żołnowski (RETIRED) gentoo-dev 2012-02-29 20:23:50 UTC
Fixed in dracut-017. I have applied upstream's version of a patch.

Thank you for the report and submitting to initramfs ml!
Comment 5 Amadeusz Żołnowski (RETIRED) gentoo-dev 2012-03-13 12:16:40 UTC
Can you confirm it works as expected?
Comment 6 Dennis Schridde 2012-03-13 22:32:00 UTC
(In reply to comment #5)
> Can you confirm it works as expected?
My system still boots with 017, but I doubt that the following expressions are equal:
[ "${_dev%%#*}" != "$_dev" ]
vs. my original line:
[ "${_dev###}" != "$_dev" ]

The upstream line parameter expansion removes comments from the end of the line, while mine checks whether the line consists only of a comment (i.e. begins with a comment character). Did anyone test whether a line as the following still works, or whether it is skipped?
/dev/null /usr none defaults 0 0 # comment