From 5ebb242262de0a9d19434f1ab5d881ee2b95627b Mon Sep 17 00:00:00 2001
From: Nikola Pajkovsky <npajkovs@redhat.com>
Date: Mon, 27 Jun 2011 16:42:19 +0200
Subject: [PATCH] Revert "remove bashism from ccpp-hook"
This reverts commit 859c130bf6e1ad927b32068162b07b510599990e.
(cherry picked from commit 71139fc041bb89891c45b4a96872489306c99946)
diff --git a/src/hooks/abrt-install-ccpp-hook.in b/src/hooks/abrt-install-ccpp-hook.in
index b5fac3d..9c7df75 100755
--- a/src/hooks/abrt-install-ccpp-hook.in
+++ b/src/hooks/abrt-install-ccpp-hook.in
@@ -8,17 +8,12 @@ verbose=false
DEFAULT_LOCATION=/var/spool/abrt
-wspace='[ ]*'
-DUMP_LOCATION=`grep "^${wspace}DumpLocation${wspace}=" @sysconfdir@/abrt/abrt.conf \
- | sed -e "s/^${wspace}DumpLocation${wspace}=${wspace}//" -e "s/${wspace}\$//"`
+DUMP_LOCATION=`cat @sysconfdir@/abrt/abrt.conf | grep '^[ ]*DumpLocation'`
+DUMP_LOCATION=${DUMP_LOCATION#*DumpLocation*=}
+DUMP_LOCATION=${DUMP_LOCATION// /}
-if [ x"$DUMP_LOCATION" = x"" ]; then
+if [ "$DUMP_LOCATION" = "" ]; then
DUMP_LOCATION=$DEFAULT_LOCATION
-else
- if [ x"${DUMP_LOCATION#* }" != x"$DUMP_LOCATION" ]; then
- # DUMP_LOCATION has a space.
- DUMP_LOCATION=$DEFAULT_LOCATION
- fi
fi
PATTERN_FILE="/proc/sys/kernel/core_pattern"
--
1.7.6