summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-kernel/dracut/files/041-r1-0003-Take-into-account-lib64-dirs-when-dete.patch')
-rw-r--r--sys-kernel/dracut/files/041-r1-0003-Take-into-account-lib64-dirs-when-dete.patch60
1 files changed, 60 insertions, 0 deletions
diff --git a/sys-kernel/dracut/files/041-r1-0003-Take-into-account-lib64-dirs-when-dete.patch b/sys-kernel/dracut/files/041-r1-0003-Take-into-account-lib64-dirs-when-dete.patch
new file mode 100644
index 000000000000..b355f8445c69
--- /dev/null
+++ b/sys-kernel/dracut/files/041-r1-0003-Take-into-account-lib64-dirs-when-dete.patch
@@ -0,0 +1,60 @@
+From acfd4d98e821dbaa9ae68dde82fb8843fbf5de59 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Amadeusz=20=C5=BBo=C5=82nowski?= <aidecoe@aidecoe.name>
+Date: Sun, 11 Jan 2015 15:10:39 +0100
+Subject: [PATCH 3/4] Take into account lib64 dirs when detecting version,
+ modules and params
+
+---
+ lsinitrd.sh | 15 ++++++++++++---
+ 1 file changed, 12 insertions(+), 3 deletions(-)
+
+diff --git a/lsinitrd.sh b/lsinitrd.sh
+index 2ed6e56..0355c87 100755
+--- a/lsinitrd.sh
++++ b/lsinitrd.sh
+@@ -108,6 +108,12 @@ if ! [[ -f "$image" ]]; then
+ exit 1
+ fi
+
++dracutlibdirs() {
++ for d in lib64/dracut lib/dracut usr/lib64/dracut usr/lib/dracut; do
++ echo "$d/$1"
++ done
++}
++
+ extract_files()
+ {
+ (( ${#filenames[@]} == 1 )) && nofileinfo=1
+@@ -124,7 +130,8 @@ extract_files()
+ list_modules()
+ {
+ echo "dracut modules:"
+- $CAT "$image" | cpio --extract --verbose --quiet --to-stdout -- 'lib/dracut/modules.txt' 'usr/lib/dracut/modules.txt' 2>/dev/null
++ $CAT "$image" | cpio --extract --verbose --quiet --to-stdout -- \
++ $(dracutlibdirs modules.txt) 2>/dev/null
+ ((ret+=$?))
+ }
+
+@@ -217,7 +224,8 @@ ret=0
+ if (( ${#filenames[@]} > 0 )); then
+ extract_files
+ else
+- version=$($CAT "$image" | cpio --extract --verbose --quiet --to-stdout -- 'lib/dracut/dracut-*' 'usr/lib/dracut/dracut-*' 2>/dev/null)
++ version=$($CAT "$image" | cpio --extract --verbose --quiet --to-stdout -- \
++ $(dracutlibdirs 'dracut-*') 2>/dev/null)
+ ((ret+=$?))
+ echo "Version: $version"
+ echo
+@@ -226,7 +234,8 @@ else
+ echo "========================================================================"
+ else
+ echo -n "Arguments: "
+- $CAT "$image" | cpio --extract --verbose --quiet --to-stdout -- 'lib/dracut/build-parameter.txt' 'usr/lib/dracut/build-parameter.txt' 2>/dev/null
++ $CAT "$image" | cpio --extract --verbose --quiet --to-stdout -- \
++ $(dracutlibdirs build-parameter.txt) 2>/dev/null
+ echo
+ list_modules
+ list_files
+--
+2.3.3
+