dracut/mkinitrd-fix-boot-dir-detection.patch

19 lines
687 B
Diff
Raw Normal View History

--- dracut-034.orig/mkinitrd-dracut.sh
+++ dracut-034/mkinitrd-dracut.sh
@@ -179,7 +179,14 @@ while (($# > 0)); do
;;
-i) read_arg initrd_images "$@" || shift $?
for initrd_image in $initrd_images;do
- targets="$targets $boot_dir/$initrd_image"
+ # Check if the initrd_image contains a path.
+ # if not, then add the default boot_dir
+ dname=`dirname $initrd_image`
+ if [ "$dname" == "." ]; then
+ targets="$targets $boot_dir/$initrd_image";
+ else
+ targets="$targets $initrd_image";
+ fi
done
;;
*) if [[ ! $targets ]]; then