Blame 0004-dracut.sh-do-not-bail-out-if-kernel-modules-dir-is-m.patch

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