[PATCH] abrt-harvest-uefioops.in: test for abrtd after testing for pstore, not before
Adam Williamson
awilliam at redhat.com
Thu May 16 20:10:46 UTC 2013
If I'm reading this script right, this seems to make sense. At least this way, if /sys/fs/pstore does not exist at all, we'll exit 0 before we sleep for 1 second for no good reason.
---
src/hooks/abrt-harvest-uefioops.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/hooks/abrt-harvest-uefioops.in b/src/hooks/abrt-harvest-uefioops.in
index 9f63256..88649ea 100644
--- a/src/hooks/abrt-harvest-uefioops.in
+++ b/src/hooks/abrt-harvest-uefioops.in
@@ -6,6 +6,8 @@
# then removes the files (UEFI storage is a limited resource).
#
+cd /sys/fs/pstore 2>/dev/null || exit 0
+
# Wait for abrtd to start. Give it at least 1 second to initialize.
i=10
while ! pidof abrtd >/dev/null; do
@@ -16,8 +18,6 @@ while ! pidof abrtd >/dev/null; do
done
sleep 1
-cd /sys/fs/pstore 2>/dev/null || exit 0
-
abrt-merge-uefioops -o * | abrt-dump-oops -D
if test $? = 0; then
abrt-merge-uefioops -d *
--
1.8.2.1
More information about the Crash-catcher
mailing list