Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot parse /etc/fstab with trailing "," in the fs_mntops field #832

Open
rwmjones opened this issue May 9, 2024 · 2 comments
Open

cannot parse /etc/fstab with trailing "," in the fs_mntops field #832

rwmjones opened this issue May 9, 2024 · 2 comments

Comments

@rwmjones
Copy link
Contributor

rwmjones commented May 9, 2024

$ mkdir -p root/etc
$ echo '/dev/mapper/foo-bar / xfs defaults, 0 0' > root/etc/fstab
$ cat root/etc/fstab
/dev/mapper/foo-bar / xfs defaults, 0 0

Note extra "," in the fourth field. Apparently the tools which normally parse fstab are fine with that.

$ augtool -r $PWD/root
augtool> get /augeas/files/etc/fstab/error/message
/augeas/files/etc/fstab/error/message = Iterated lens matched less than it should
augtool> get /augeas/files/etc/fstab/error/line
/augeas/files/etc/fstab/error/line = 1
augtool> get /augeas/files/etc/fstab/error/char
/augeas/files/etc/fstab/error/char = 34

Augeas fails to parse the file at the extra "," character.

@igalic
Copy link

igalic commented May 13, 2024

can you provide a PR with a fix?
or at least one with a failing test?

@rwmjones
Copy link
Contributor Author

I will try to at some point, although I'm pretty busy at the moment. The first comment does contain a test case which should be reproducible anywhere if you're just interested in seeing the failure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants