diff --git a/0453-Resolve-symbolic-links-for-i-and-k-parameters-bsc-90.patch b/0453-Resolve-symbolic-links-for-i-and-k-parameters-bsc-90.patch new file mode 100644 index 0000000..138f80d --- /dev/null +++ b/0453-Resolve-symbolic-links-for-i-and-k-parameters-bsc-90.patch @@ -0,0 +1,30 @@ +From 7957bd01b097507a601495ed7cd2c8480c2af67b Mon Sep 17 00:00:00 2001 +From: Daniel Molkentin +Date: Thu, 17 Nov 2016 16:08:31 +0100 +Subject: [PATCH] Resolve symbolic links for -i and -k parameters (bsc#902375) + +--- + mkinitrd-suse.sh | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/mkinitrd-suse.sh b/mkinitrd-suse.sh +index 0f2b3c4..bc49d73 100755 +--- a/mkinitrd-suse.sh ++++ b/mkinitrd-suse.sh +@@ -237,11 +237,13 @@ while (($# > 0)); do + -k) # Would be nice to get a list of images here + read_arg kernel_images "$@" || shift $? + for kernel_image in $kernel_images;do ++ [ -L "/boot/$kernel_image" ] && kernel_image="$(readlink "/boot/$kernel_image")" + kernels="$kernels ${kernel_image#*-}" + done + ;; + -i) read_arg initrd_images "$@" || shift $? + for initrd_image in $initrd_images;do ++ [ -L "/boot/$initrd_image" ] && initrd_image="$(readlink "/boot/$initrd_image")" + # Check if the initrd_image contains a path. + # if not, then add the default boot_dir + dname=`dirname $initrd_image` +-- +2.10.0 + diff --git a/dracut.changes b/dracut.changes index 1f2bf7d..75ba473 100644 --- a/dracut.changes +++ b/dracut.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Jan 16 19:05:14 UTC 2017 - daniel.molkentin@suse.com + +- Resolve symbolic links for -i and -k parameters (bsc#902375) + * add 0453-Resolve-symbolic-links-for-i-and-k-parameters-bsc-90.patch + ------------------------------------------------------------------- Fri Jan 6 15:08:06 UTC 2017 - mmarek@suse.cz diff --git a/dracut.spec b/dracut.spec index 72b4466..bb936e7 100644 --- a/dracut.spec +++ b/dracut.spec @@ -173,6 +173,7 @@ Patch404: 0404-dracut-emergency-optionally-print-fs-help.patch Patch450: 0450-Strip-NUL-bytes-in-stream-before-push-in-string.patch Patch451: 0451-systemd-initrd-add-initrd-root-device.target.patch Patch452: 0452-Always-try-to-add-pinctrl-cherryview.patch +Patch453: 0453-Resolve-symbolic-links-for-i-and-k-parameters-bsc-90.patch # On top patches/fixes which have to be applied late Patch500: 0500-Reset-IFS-variable.patch @@ -378,6 +379,7 @@ chmod a+x modules.d/91zipl/install_zipl_cmdline.sh %patch450 -p1 %patch451 -p1 %patch452 -p1 +%patch453 -p1 %patch500 -p1 %patch501 -p1