dracut: enable initramfs building without kernel modules
parent
1a6fdf2417
commit
5db6ca5a4b
|
|
@ -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
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue