|
|
64b87c |
From 3cf4ec08e51c6b6c6d21d4b1cf67b98bb7878558 Mon Sep 17 00:00:00 2001
|
|
|
64b87c |
From: Harald Hoyer <harald@redhat.com>
|
|
|
64b87c |
Date: Fri, 3 Jul 2015 14:35:25 +0200
|
|
|
64b87c |
Subject: [PATCH] lsinitrd.sh: ignore "cat: write error: Broken pipe"
|
|
|
64b87c |
|
|
|
64b87c |
---
|
|
|
64b87c |
lsinitrd.sh | 12 ++++++------
|
|
|
64b87c |
1 file changed, 6 insertions(+), 6 deletions(-)
|
|
|
64b87c |
|
|
|
64b87c |
diff --git a/lsinitrd.sh b/lsinitrd.sh
|
|
|
1755ca |
index b086a635..88fe9834 100755
|
|
|
64b87c |
--- a/lsinitrd.sh
|
|
|
64b87c |
+++ b/lsinitrd.sh
|
|
|
64b87c |
@@ -116,7 +116,7 @@ extract_files()
|
|
|
64b87c |
for f in ${!filenames[@]}; do
|
|
|
64b87c |
[[ $nofileinfo ]] || echo "initramfs:/$f"
|
|
|
64b87c |
[[ $nofileinfo ]] || echo "========================================================================"
|
|
|
64b87c |
- $CAT $image | cpio --extract --verbose --quiet --to-stdout $f 2>/dev/null
|
|
|
64b87c |
+ $CAT $image 2>/dev/null | cpio --extract --verbose --quiet --to-stdout $f 2>/dev/null
|
|
|
64b87c |
((ret+=$?))
|
|
|
64b87c |
[[ $nofileinfo ]] || echo "========================================================================"
|
|
|
64b87c |
[[ $nofileinfo ]] || echo
|
|
|
64b87c |
@@ -126,7 +126,7 @@ extract_files()
|
|
|
64b87c |
list_modules()
|
|
|
64b87c |
{
|
|
|
64b87c |
echo "dracut modules:"
|
|
|
64b87c |
- $CAT "$image" | cpio --extract --verbose --quiet --to-stdout -- 'lib/dracut/modules.txt' 'usr/lib/dracut/modules.txt' 2>/dev/null
|
|
|
64b87c |
+ $CAT "$image" 2>/dev/null | cpio --extract --verbose --quiet --to-stdout -- 'lib/dracut/modules.txt' 'usr/lib/dracut/modules.txt' 2>/dev/null
|
|
|
64b87c |
((ret+=$?))
|
|
|
64b87c |
}
|
|
|
64b87c |
|
|
|
64b87c |
@@ -134,9 +134,9 @@ list_files()
|
|
|
64b87c |
{
|
|
|
64b87c |
echo "========================================================================"
|
|
|
64b87c |
if [ "$sorted" -eq 1 ]; then
|
|
|
64b87c |
- $CAT "$image" | cpio --extract --verbose --quiet --list | sort -n -k5
|
|
|
64b87c |
+ $CAT "$image" 2>/dev/null | cpio --extract --verbose --quiet --list | sort -n -k5
|
|
|
64b87c |
else
|
|
|
64b87c |
- $CAT "$image" | cpio --extract --verbose --quiet --list | sort -k9
|
|
|
64b87c |
+ $CAT "$image" 2>/dev/null | cpio --extract --verbose --quiet --list | sort -k9
|
|
|
64b87c |
fi
|
|
|
64b87c |
((ret+=$?))
|
|
|
64b87c |
echo "========================================================================"
|
|
|
64b87c |
@@ -220,7 +220,7 @@ ret=0
|
|
|
64b87c |
if (( ${#filenames[@]} > 0 )); then
|
|
|
64b87c |
extract_files
|
|
|
64b87c |
else
|
|
|
64b87c |
- version=$($CAT "$image" | cpio --extract --verbose --quiet --to-stdout -- 'lib/dracut/dracut-*' 'usr/lib/dracut/dracut-*' 2>/dev/null)
|
|
|
64b87c |
+ version=$($CAT "$image" 2>/dev/null | cpio --extract --verbose --quiet --to-stdout -- 'lib/dracut/dracut-*' 'usr/lib/dracut/dracut-*' 2>/dev/null)
|
|
|
64b87c |
((ret+=$?))
|
|
|
64b87c |
echo "Version: $version"
|
|
|
64b87c |
echo
|
|
|
64b87c |
@@ -229,7 +229,7 @@ else
|
|
|
64b87c |
echo "========================================================================"
|
|
|
64b87c |
else
|
|
|
64b87c |
echo -n "Arguments: "
|
|
|
64b87c |
- $CAT "$image" | cpio --extract --verbose --quiet --to-stdout -- 'lib/dracut/build-parameter.txt' 'usr/lib/dracut/build-parameter.txt' 2>/dev/null
|
|
|
64b87c |
+ $CAT "$image" 2>/dev/null | cpio --extract --verbose --quiet --to-stdout -- 'lib/dracut/build-parameter.txt' 'usr/lib/dracut/build-parameter.txt' 2>/dev/null
|
|
|
64b87c |
echo
|
|
|
64b87c |
list_modules
|
|
|
64b87c |
list_files
|