From 05214a0bedc084a41c35a128609745ad04a0c6cf Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 8 Oct 2013 15:03:40 +0200 Subject: [PATCH] dracut.sh: do not bail out, if kernel modules dir is missing and only print a warning message --- dracut.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/dracut.sh b/dracut.sh index e135dfc..d9533dd 100755 --- a/dracut.sh +++ b/dracut.sh @@ -496,17 +496,18 @@ if [[ $regenerate_all == "yes" ]]; then ((ret+=$?)) done exit $ret -elif [[ $kernel ]]; then - if ! [[ -d /lib/modules/$kernel ]] && [[ $no_kernel != yes ]]; then - printf -- "Kernel version $kernel has no modules in /lib/modules/$kernel\n" >&2 - exit 1 - fi fi if ! [[ $kernel ]]; then kernel=$(uname -r) fi +if [[ $kernel ]]; then + if ! [[ -d /lib/modules/$kernel ]] && [[ $no_kernel != yes ]]; then + printf -- "Kernel version $kernel has no module directory /lib/modules/$kernel\n" >&2 + fi +fi + if ! [[ $outfile ]]; then [[ -f /etc/machine-id ]] && read MACHINE_ID < /etc/machine-id