From f0df0f3fcd0e79a697ec8bd45b9ce2e420f2820a 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 e135dfc8..d9533dd0 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