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
This commit is contained in:
Daniel Molkentin 2017-01-16 19:28:57 +00:00 committed by Git OBS Bridge
parent df723ad91e
commit d4562a8664
3 changed files with 38 additions and 0 deletions

View File

@ -0,0 +1,30 @@
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

View File

@ -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

View File

@ -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