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

20 lines
790 B
Diff

diff -urNB dracut-033/mkinitrd-dracut.sh new/mkinitrd-dracut.sh
--- dracut-033/mkinitrd-dracut.sh 2013-10-04 13:57:15.000000000 +0200
+++ new/mkinitrd-dracut.sh 2013-10-08 20:55:59.280035248 +0200
@@ -172,7 +172,14 @@
;;
-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