dracut/0453-Resolve-symbolic-links-for-i-and-k-parameters-bsc-90.patch
Daniel Molkentin d4562a8664 Accepting request 450568 from home:dmolkentin:dracut:869496
- Resolve symbolic links for -i and -k parameters (bsc#902375)
 * add 0453-Resolve-symbolic-links-for-i-and-k-parameters-bsc-90.patch

OBS-URL: https://build.opensuse.org/request/show/450568
OBS-URL: https://build.opensuse.org/package/show/Base:System/dracut?expand=0&rev=279
2017-01-16 19:28:57 +00:00

31 lines
1.0 KiB
Diff

From 7957bd01b097507a601495ed7cd2c8480c2af67b Mon Sep 17 00:00:00 2001
From: Daniel Molkentin <dmolkentin@suse.com>
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