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