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 () ( find_kernel_modules_by_path () (
local _OLDIFS local _OLDIFS
_OLDIFS=$IFS
IFS=: [[ -f $srcmods/modules.dep ]] || return 0
while read a rest; do
[[ $a = */$1/* ]] || continue _OLDIFS=$IFS
echo $srcmods/$a IFS=:
done < $srcmods/modules.dep while read a rest; do
IFS=$_OLDIFS [[ $a = */$1/* ]] || continue
echo $srcmods/$a
done < $srcmods/modules.dep
IFS=$_OLDIFS
return 0 return 0
) )



View File

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


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


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


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