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