44797e
From 8482a75bf58d5e68f4c63746cb27433954f1d54a Mon Sep 17 00:00:00 2001
44797e
From: Jakub Filak <jfilak@redhat.com>
44797e
Date: Thu, 9 Oct 2014 16:28:12 +0200
44797e
Subject: [ABRT PATCH 69/69] console-notifications: use return instead of exit
44797e
44797e
Thanks Ray Strode [halfline] <rstrode@redhat.com>
44797e
44797e
Related to rhbz#1150169
44797e
44797e
Signed-off-by: Jakub Filak <jfilak@redhat.com>
44797e
---
44797e
 src/cli/abrt-console-notification.sh | 10 +++++-----
44797e
 1 file changed, 5 insertions(+), 5 deletions(-)
44797e
44797e
diff --git a/src/cli/abrt-console-notification.sh b/src/cli/abrt-console-notification.sh
44797e
index 849273c..38de7bb 100755
44797e
--- a/src/cli/abrt-console-notification.sh
44797e
+++ b/src/cli/abrt-console-notification.sh
44797e
@@ -1,13 +1,13 @@
44797e
-# If shell is not connect to a terminal, exit immediately, because this script
44797e
+# If shell is not connect to a terminal, return immediately, because this script
44797e
 # should print out ABRT's status and it is senseless to continue without
44797e
 # terminal.
44797e
-tty -s || exit 0
44797e
+tty -s || return 0
44797e
 
44797e
 # If $HOME is not set, a non human user is logging in to shell but this script
44797e
-# should provide information to human users, therefore exiting immediately
44797e
+# should provide information to human users, therefore returning immediately
44797e
 # without showing the notification.
44797e
 if [ -z "$HOME" ]; then
44797e
-    exit 0
44797e
+    return 0
44797e
 fi
44797e
 
44797e
 if [ -z "$ABRT_DEBUG_LOG" ]; then
44797e
@@ -19,7 +19,7 @@ SINCEFILE="$LPATHDIR/lastnotification"
44797e
 
44797e
 if [ ! -f "$LPATHDIR" ]; then
44797e
     # It might happen that user doesn't have write access on his home.
44797e
-    mkdir -p "$LPATHDIR" >"$ABRT_DEBUG_LOG" 2>&1 || exit 0
44797e
+    mkdir -p "$LPATHDIR" >"$ABRT_DEBUG_LOG" 2>&1 || return 0
44797e
 fi
44797e
 
44797e
 TMPPATH=`mktemp --tmpdir="$LPATHDIR" lastnotification.XXXXXXXX 2> "$ABRT_DEBUG_LOG"`
44797e
-- 
44797e
1.8.3.1
44797e