Blame SOURCES/0071-console-notifications-skip-non-interactive-shells.patch

baab13
From bbd1e3c8765a8e28d4ade94eff60640c140b436a Mon Sep 17 00:00:00 2001
baab13
From: Jakub Filak <jfilak@redhat.com>
baab13
Date: Sat, 11 Oct 2014 00:05:07 +0200
baab13
Subject: [ABRT PATCH 71/71] console-notifications: skip non-interactive shells
baab13
baab13
Related to rhbz#1141485
baab13
Related to rhbz#1139001
baab13
baab13
Signed-off-by: Jakub Filak <jfilak@redhat.com>
baab13
---
baab13
 src/cli/abrt-console-notification.sh | 3 +++
baab13
 1 file changed, 3 insertions(+)
baab13
baab13
diff --git a/src/cli/abrt-console-notification.sh b/src/cli/abrt-console-notification.sh
baab13
index 38de7bb..976dfc3 100755
baab13
--- a/src/cli/abrt-console-notification.sh
baab13
+++ b/src/cli/abrt-console-notification.sh
baab13
@@ -3,6 +3,9 @@
baab13
 # terminal.
baab13
 tty -s || return 0
baab13
 
baab13
+# Skip all for noninteractive shells for the same reason as above.
baab13
+[ -z "$PS1" ] && 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 returning immediately
baab13
 # without showing the notification.
baab13
-- 
baab13
1.8.3.1
baab13