]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
fix(dracut-init): use sysroot when checking udev rule program existence
authorJames Le Cuirot <jlecuirot@microsoft.com>
Wed, 30 Apr 2025 16:24:54 +0000 (17:24 +0100)
committerNeal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
Fri, 2 May 2025 19:22:45 +0000 (15:22 -0400)
Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
dracut-init.sh

index 3eaa8524ebe8b833431bcd8c356461d9f7caedba..a7ce113863bbb34313b5a4a154167cd0c0a59d21 100755 (executable)
@@ -434,7 +434,7 @@ inst_rule_programs() {
     # shellcheck disable=SC2013
     for _prog in $(sed -nr 's/.*PROGRAM==?"([^ "]+).*/\1/p' "$1"); do
         _bin=""
-        if [[ -x ${udevdir}/$_prog ]]; then
+        if [[ -x ${dracutsysrootdir}${udevdir}/$_prog ]]; then
             _bin="${udevdir}"/$_prog
         elif [[ ${_prog/\$env\{/} == "$_prog" ]]; then
             _bin=$(find_binary "$_prog") || {
@@ -449,7 +449,7 @@ inst_rule_programs() {
     # shellcheck disable=SC2013
     for _prog in $(sed -nr 's/.*RUN[+=]=?"([^ "]+).*/\1/p' "$1"); do
         _bin=""
-        if [[ -x ${udevdir}/$_prog ]]; then
+        if [[ -x ${dracutsysrootdir}${udevdir}/$_prog ]]; then
             _bin=${udevdir}/$_prog
         elif [[ ${_prog/\$env\{/} == "$_prog" ]] && [[ ${_prog} != "/sbin/initqueue" ]]; then
             _bin=$(find_binary "$_prog") || {
@@ -464,7 +464,7 @@ inst_rule_programs() {
     # shellcheck disable=SC2013
     for _prog in $(sed -nr 's/.*IMPORT\{program\}==?"([^ "]+).*/\1/p' "$1"); do
         _bin=""
-        if [[ -x ${udevdir}/$_prog ]]; then
+        if [[ -x ${dracutsysrootdir}${udevdir}/$_prog ]]; then
             _bin=${udevdir}/$_prog
         elif [[ ${_prog/\$env\{/} == "$_prog" ]]; then
             _bin=$(find_binary "$_prog") || {