]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
dracut.sh: do not bail out, if kernel modules dir is missing
authorHarald Hoyer <harald@redhat.com>
Tue, 8 Oct 2013 13:03:40 +0000 (15:03 +0200)
committerHarald Hoyer <harald@redhat.com>
Tue, 8 Oct 2013 13:05:21 +0000 (15:05 +0200)
and only print a warning message

dracut.sh

index e135dfc82126c76f0b3d019dc65ec416d825c620..d9533dd010724da2ee8cbf8ec04254c4c1ff277e 100755 (executable)
--- 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