All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Take into account lib64 dirs when detecting version, modules and params
@ 2015-01-11 14:12 Amadeusz Żołnowski
       [not found] ` <1420985530-5006-1-git-send-email-aidecoe-2qtfh70TtYba5EbDDlwbIw@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Amadeusz Żołnowski @ 2015-01-11 14:12 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA; +Cc: Amadeusz Żołnowski

---
 lsinitrd.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lsinitrd.sh b/lsinitrd.sh
index 4f12c2c..dc1f88f 100755
--- a/lsinitrd.sh
+++ b/lsinitrd.sh
@@ -124,7 +124,7 @@ 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 -- 'lib64/dracut/modules.txt' 'lib/dracut/modules.txt' 'usr/lib/dracut/modules.txt' 2>/dev/null
     ((ret+=$?))
 }
 
@@ -217,7 +217,7 @@ 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 -- 'lib64/dracut/dracut-*' 'lib/dracut/dracut-*' 'usr/lib/dracut/dracut-*' 2>/dev/null)
     ((ret+=$?))
     echo "Version: $version"
     echo
@@ -226,7 +226,7 @@ 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 -- 'lib64/dracut/build-parameter.txt' 'lib/dracut/build-parameter.txt' 'usr/lib/dracut/build-parameter.txt' 2>/dev/null
         echo
         list_modules
         list_files
-- 
2.2.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread
* [PATCH] Take into account lib64 dirs when detecting version, modules and params
@ 2015-03-24 13:13 Amadeusz Żołnowski
  0 siblings, 0 replies; 5+ messages in thread
From: Amadeusz Żołnowski @ 2015-03-24 13:13 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA; +Cc: Amadeusz Żołnowski

---
 lsinitrd.sh | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/lsinitrd.sh b/lsinitrd.sh
index 4f12c2c..dda0b74 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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-03-26 15:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-11 14:12 [PATCH] Take into account lib64 dirs when detecting version, modules and params Amadeusz Żołnowski
     [not found] ` <1420985530-5006-1-git-send-email-aidecoe-2qtfh70TtYba5EbDDlwbIw@public.gmane.org>
2015-01-11 14:20   ` Andrei Borzenkov
     [not found]     ` <20150111172029.0653ffce-stAJ6ESoqRzYCGPCin2YbQ@public.gmane.org>
2015-01-12  6:25       ` Alexander Tsoy
2015-03-26 15:38   ` [Dracut GitHub] Patchset imported to github Dracut GitHub Import Bot
2015-03-24 13:13 [PATCH] Take into account lib64 dirs when detecting version, modules and params Amadeusz Żołnowski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.