Search
j0ke.net Open Build Service
>
Projects
>
internetx
:
kiwi
:
Appliance
>
dracut
> 0018-dracut.sh-fail-hard-if-we-find-modules-and-modules.d.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File 0018-dracut.sh-fail-hard-if-we-find-modules-and-modules.d.patch of Package dracut
From 5fb5affa39e89619ed6fcc189bb2086327a5e3c5 Mon Sep 17 00:00:00 2001 From: Harald Hoyer <harald@redhat.com> Date: Wed, 13 Jan 2016 09:32:24 +0100 Subject: [PATCH] dracut.sh: fail hard, if we find modules and modules.dep is missing If modules are present in /lib/modules/<kernelversion> and modules.dep is empty, depmod was not run most likely. --- dracut.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dracut.sh b/dracut.sh index 6dc98582..98dbe0bc 100755 --- a/dracut.sh +++ b/dracut.sh @@ -925,7 +925,12 @@ abs_outfile=$(readlink -f "$outfile") && outfile="$abs_outfile" if [[ $no_kernel != yes ]] && [[ -d $srcmods ]]; then if ! [[ -f $srcmods/modules.dep ]]; then - dwarn "$srcmods/modules.dep is missing. Did you run depmod?" + if [[ -n "$(find "$srcmods" -name '*.ko*')" ]]; then + dfatal "$srcmods/modules.dep is missing. Did you run depmod?" + exit 1 + else + dwarn "$srcmods/modules.dep is missing. Did you run depmod?" + fi elif ! ( command -v gzip &>/dev/null && command -v xz &>/dev/null); then read _mod < $srcmods/modules.dep _mod=${_mod%%:*}