Skip to content

Commit b2c6b58

Browse files
committed
fix(dracut.sh): exit if resolving executable dependencies fails
We came across an issue where, when resolving executable dependencies, a call to a buggy glib function in `dracut-install` was causing a termination with SIGSEGV, but dracut didn't stop the build process, which resulted in an unbootable initrd, due to missing required libraries. ``` dracut: *** Resolving executable dependencies *** xargs: /usr/lib/dracut/dracut-install: terminated by signal 11 dracut: *** Resolving executable dependencies done *** ``` Therefore, stop the initrd creation in this case.
1 parent fffeade commit b2c6b58

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

dracut.sh

+7-1
Original file line numberDiff line numberDiff line change
@@ -2045,7 +2045,13 @@ if [[ $kernel_only != yes ]]; then
20452045
# shellcheck disable=SC2086
20462046
find "$initdir" -type f -perm /0111 -not -path '*.ko' -print0 \
20472047
| xargs -r -0 $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${dracutsysrootdir:+-r "$dracutsysrootdir"} -R ${DRACUT_FIPS_MODE:+-f} --
2048-
dinfo "*** Resolving executable dependencies done ***"
2048+
# shellcheck disable=SC2181
2049+
if (($? == 0)); then
2050+
dinfo "*** Resolving executable dependencies done ***"
2051+
else
2052+
dfatal "Resolving executable dependencies failed"
2053+
exit 1
2054+
fi
20492055
fi
20502056
20512057
# Now we are done with lazy resolving, always install dependencies

0 commit comments

Comments
 (0)