Skip to content

Commit

Permalink
fix(nfs): do not set DRACUT_RESOLVE_LAZY for musl
Browse files Browse the repository at this point in the history
Also move inst_libdir_file as the last step to handle
the error case better.

Fixes dracut-ng#1087
  • Loading branch information
jozzsi committed Jan 7, 2025
1 parent 37e52ba commit 7f2d93b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion dracut.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1357,7 +1357,11 @@ if [[ $early_microcode == yes ]] || { [[ $acpi_override == yes ]] && [[ -d $acpi
mkdir "$early_cpio_dir"
fi
[[ "$dracutsysrootdir" ]] || [[ "$noexec" ]] || export DRACUT_RESOLVE_LAZY="1"
if ${DRACUT_LDD:-ldd} "${dracutsysrootdir}/bin/sh" | grep -q musl &> /dev/null; then
musl=1
fi
[[ "$dracutsysrootdir" ]] || [[ "$noexec" ]] || [[ "$musl" ]] || export DRACUT_RESOLVE_LAZY="1"
if [[ $print_cmdline ]]; then
stdloglvl=0
Expand Down
4 changes: 2 additions & 2 deletions modules.d/95nfs/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@ install() {
echo "alias nfs4 nfs" > "$initdir"/etc/modprobe.d/nfs.conf
fi

inst_libdir_file 'libnfsidmap_nsswitch.so*' 'libnfsidmap/*.so' 'libnfsidmap*.so*'

_nsslibs=$(
cat "$dracutsysrootdir"/{,usr/}etc/nsswitch.conf 2> /dev/null \
| sed -e '/^#/d' -e 's/^.*://' -e 's/\[NOTFOUND=return\]//' \
Expand Down Expand Up @@ -140,4 +138,6 @@ install() {
done

dracut_need_initqueue

inst_libdir_file 'libnfsidmap_nsswitch.so*' 'libnfsidmap/*.so' 'libnfsidmap*.so*'
}

0 comments on commit 7f2d93b

Please sign in to comment.