dracut: enable initramfs building without kernel modules

master
Harald Hoyer 2013-02-18 11:57:20 +01:00
parent 1a6fdf2417
commit 5db6ca5a4b
2 changed files with 15 additions and 11 deletions

View File

@ -1499,13 +1499,16 @@ module_is_host_only() (

find_kernel_modules_by_path () (
local _OLDIFS
_OLDIFS=$IFS
IFS=:
while read a rest; do
[[ $a = */$1/* ]] || continue
echo $srcmods/$a
done < $srcmods/modules.dep
IFS=$_OLDIFS

[[ -f $srcmods/modules.dep ]] || return 0

_OLDIFS=$IFS
IFS=:
while read a rest; do
[[ $a = */$1/* ]] || continue
echo $srcmods/$a
done < $srcmods/modules.dep
IFS=$_OLDIFS
return 0
)


View File

@ -689,10 +689,11 @@ esac

abs_outfile=$(readlink -f "$outfile") && outfile="$abs_outfile"

[[ -f $srcmods/modules.dep ]] || {
dfatal "$srcmods/modules.dep is missing. Did you run depmod?"
exit 1
}
if [[ -d $srcmods ]]; then
[[ -f $srcmods/modules.dep ]] || {
dwarn "$srcmods/modules.dep is missing. Did you run depmod?"
}
fi

if [[ -f $outfile && ! $force ]]; then
dfatal "Will not override existing initramfs ($outfile) without --force"