From 0033d1ba7530f4c80c73e97c2aa6f57dbba8d034 Mon Sep 17 00:00:00 2001 From: lemmi Date: Wed, 1 Jul 2015 18:41:35 +0200 Subject: [PATCH] bash: bashrc: bail out in non-interactive shell --- srcpkgs/bash/files/bashrc | 5 +++++ srcpkgs/bash/template | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/srcpkgs/bash/files/bashrc b/srcpkgs/bash/files/bashrc index dee437610af..832c52aa659 100644 --- a/srcpkgs/bash/files/bashrc +++ b/srcpkgs/bash/files/bashrc @@ -3,6 +3,11 @@ # Do not edit this file. # Place your readable configs in /etc/bash/bashrc.d/*.sh +if [[ $- != *i* ]] ; then + # Shell is non-interactive. Be done now! + return +fi + if [ -d /etc/bash/bashrc.d/ ]; then for f in /etc/bash/bashrc.d/*.sh; do [ -r "$f" ] && . "$f" diff --git a/srcpkgs/bash/template b/srcpkgs/bash/template index 1308ffdf2b4..3f8be200870 100644 --- a/srcpkgs/bash/template +++ b/srcpkgs/bash/template @@ -3,7 +3,7 @@ pkgname=bash _bash_distver=4.3 _bash_patchlevel=039 version=${_bash_distver}.${_bash_patchlevel} -revision=4 +revision=5 wrksrc=${pkgname}-${_bash_distver} build_pie=yes build_style=gnu-configure