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

06486d
From bbd1e3c8765a8e28d4ade94eff60640c140b436a Mon Sep 17 00:00:00 2001
06486d
From: Jakub Filak <jfilak@redhat.com>
06486d
Date: Sat, 11 Oct 2014 00:05:07 +0200
06486d
Subject: [ABRT PATCH 71/71] console-notifications: skip non-interactive shells
06486d
06486d
Related to rhbz#1141485
06486d
Related to rhbz#1139001
06486d
06486d
Signed-off-by: Jakub Filak <jfilak@redhat.com>
06486d
---
06486d
 src/cli/abrt-console-notification.sh | 3 +++
06486d
 1 file changed, 3 insertions(+)
06486d
06486d
diff --git a/src/cli/abrt-console-notification.sh b/src/cli/abrt-console-notification.sh
06486d
index 38de7bb..976dfc3 100755
06486d
--- a/src/cli/abrt-console-notification.sh
06486d
+++ b/src/cli/abrt-console-notification.sh
06486d
@@ -3,6 +3,9 @@
06486d
 # terminal.
06486d
 tty -s || return 0
06486d
 
06486d
+# Skip all for noninteractive shells for the same reason as above.
06486d
+[ -z "$PS1" ] && return 0
06486d
+
06486d
 # If $HOME is not set, a non human user is logging in to shell but this script
06486d
 # should provide information to human users, therefore returning immediately
06486d
 # without showing the notification.
06486d
-- 
06486d
1.8.3.1
06486d