Skip to content

Commit

Permalink
fix(nfs): include also entries from /usr/lib/{passwd,group}
Browse files Browse the repository at this point in the history
as those paths are used by bootc instead.

Resolves: RHEL-53431
  • Loading branch information
pvalena committed Aug 19, 2024
1 parent 833ca2c commit 148ecfa
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions modules.d/95nfs/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,20 @@ install() {

# Rather than copy the passwd file in, just set a user for rpcbind
# We'll save the state and restart the daemon from the root anyway
grep -E '^nfsnobody:|^rpc:|^rpcuser:' "$dracutsysrootdir"/etc/passwd >> "$initdir/etc/passwd"
grep -E '^nogroup:|^rpc:|^nobody:' "$dracutsysrootdir"/etc/group >> "$initdir/etc/group"
local _confdir
local _path
for _confdir in etc usr/lib; do

_filepath="${dracutsysrootdir}/${_confdir}/passwd"

[[ -r "${_filepath}" ]] \
&& grep -E '^nfsnobody:|^rpc:|^rpcuser:' "${_filepath}" >> "$initdir/${_confdir}/passwd"

_filepath="${dracutsysrootdir}/${_confdir}/group"

[[ -r "${_filepath}" ]] \
&& grep -E '^nogroup:|^rpc:|^nobody:' "${_filepath}" >> "$initdir/${_confdir}/group"
done

dracut_need_initqueue
}

0 comments on commit 148ecfa

Please sign in to comment.