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