From a5d609be289ae8788c8a6ca7e82fe90afdc95e83 Mon Sep 17 00:00:00 2001 From: Pavel Zhukov Date: Nov 30 2020 06:59:54 +0000 Subject: Check if SHELL is in bash mode --- diff --git a/profile b/profile index 1a7575d..783fe17 100644 --- a/profile +++ b/profile @@ -65,11 +65,15 @@ done unset i unset -f pathmunge -if [ -n "${BASH_VERSION-}" ] ; then - if [ -f /etc/bashrc ] ; then - # Bash login shells run only /etc/profile - # Bash non-login shells run only /etc/bashrc - # Check for double sourcing is done in /etc/bashrc. - . /etc/bashrc - fi +# Source global bash config, when interactive but not posix or sh mode +if test "$BASH" &&\ + test -z "$POSIXLY_CORRECT" &&\ + test "${0#-}" != sh &&\ + test -r /etc/bashrc +then + # Bash login shells run only /etc/profile + # Bash non-login shells run only /etc/bashrc + # Check for double sourcing is done in /etc/bashrc. + . /etc/bashrc fi + diff --git a/setup.spec b/setup.spec index 16c5b8e..d7a430d 100644 --- a/setup.spec +++ b/setup.spec @@ -1,6 +1,6 @@ Summary: A set of system configuration and setup files Name: setup -Version: 2.13.7 +Version: 2.13.8 Release: 1%{?dist} License: Public Domain Group: System Environment/Base @@ -115,6 +115,9 @@ end %{_tmpfilesdir}/%{name}.conf %changelog +* Mon Nov 30 2020 Pavel Zhukov - 2.13.8-1 +- Do not import bashrc for posix shell + * Tue Jun 23 2020 Pavel Zhukov - 2.13.7-1 - Bump release to fix git tags