[Lunar-commits] <moonbase-other> fortune: only show fortunes for ttys

v4hn me at v4hn.de
Wed Jun 19 12:34:23 CEST 2013


commit 173c4e8e7017d6cee4d4c68fae14d1e67cbed7ec
Author: v4hn <me at v4hn.de>
Date: Wed, 19 Jun 2013 03:33:32 -0700
URL: https://github.com/lunar-linux/moonbase-other/commit/173c4e8e7017d6cee4d4c68fae14d1e67cbed7ec

fortune: only show fortunes for ttys
---
  games/fortune/profile.d/fortune.rc | +3/-1     
  1 file changed, 3 insertions(+), 1 deletion(-)

--- a/games/fortune/profile.d/fortune.rc
+++ b/games/fortune/profile.d/fortune.rc
@@ -1,2 +1,4 @@
 # this can be an annoyance!
-/usr/games/fortune 1>&2
+if tty -s; then
+  /usr/games/fortune 1>&2
+fi




More information about the Lunar-commits mailing list