]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
fix: support DRACUT_RESOLVE_LAZY being unset
authorBenjamin Drung <benjamin.drung@canonical.com>
Wed, 11 Jun 2025 18:46:22 +0000 (20:46 +0200)
committerNeal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
Sun, 15 Jun 2025 05:41:25 +0000 (01:41 -0400)
Support `DRACUT_RESOLVE_LAZY` being unset when using `set -u`.

dracut-init.sh
dracut.sh

index e8a984195f65c6f3693ee07fac00742ae8e26f88..f748d85f6bbedf1a4995b481d9f08eda41a85648 100755 (executable)
@@ -229,7 +229,7 @@ if [[ $hostonly == "-h" ]]; then
     fi
 fi
 
-[[ $DRACUT_RESOLVE_LAZY ]] || export DRACUT_RESOLVE_DEPS=1
+[[ ${DRACUT_RESOLVE_LAZY-} ]] || export DRACUT_RESOLVE_DEPS=1
 inst_dir() {
     local _ret
     [[ -e ${initdir}/"$1" ]] && return 0 # already there
index b29d5c42a4c47b28e73727c64b931946a8a81853..b97ebed8eacacdd476a259ce29f0bf2255791a98 100755 (executable)
--- a/dracut.sh
+++ b/dracut.sh
@@ -2192,7 +2192,7 @@ if [[ $kernel_only != yes ]]; then
         fi
     fi
 
-    if [[ $DRACUT_RESOLVE_LAZY ]] && [[ $DRACUT_INSTALL ]]; then
+    if [[ ${DRACUT_RESOLVE_LAZY-} ]] && [[ $DRACUT_INSTALL ]]; then
         dinfo "*** Resolving executable dependencies ***"
         # shellcheck disable=SC2086
         find "$initdir" -type f -perm /0111 -not -path '*.ko*' -print0 \