initrd.scripts: mount_devfs: check whether devtmpfs is mounted on /dev#27
Open
Karlson2k wants to merge 1 commit intogentoo:masterfrom
Open
initrd.scripts: mount_devfs: check whether devtmpfs is mounted on /dev#27Karlson2k wants to merge 1 commit intogentoo:masterfrom
Karlson2k wants to merge 1 commit intogentoo:masterfrom
Conversation
Signed-off-by: Karlson2k (Evgeny Grin) <k2k@narod.ru>
|
|
Author
|
Hi @Whissi.
|
robbat2
requested changes
May 16, 2022
|
|
||
| # Options copied from /etc/init.d/udev-mount, should probably be kept in sync | ||
| if ! fs_type_in_use devtmpfs | ||
| if ! grep -Eqse "^[^ ]+ /dev ${devfs} " /proc/mounts |
There was a problem hiding this comment.
what you've proposed isn't quite the same.
- if
/foobarwas mounted with devtmpfs; then this block also wrongly did not fire, which is the bug you're trying to fix. - previously, if devtmpfs was present, but /dev was mounted with regular tmpfs, this
ifblock did NOT fire.
I think your grep test is expressed more clearly with:
awk -v devfs=$devfs 'BEGIN{rc=1}($2=="/dev" && $3==devfs){rc=0}END{exit rc}' /proc/mounts
If you agree and can rebase with that fix, i'll be happy to merge it, but I agree it shouldn't matter in normal boot cases.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If tmpfs is used for /dev, it is not enough to check whether tmpfs is mounted somewhere as it could be used for other reasons.
Also ensure that devtmpfs is mounted at the right mountpoint (/dev) and not somewhere else.