doczkal / rpms / abrt

Forked from rpms/abrt 4 years ago
Clone

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

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