GNU bug report logs - #29337
Bash reads system-wide bashrc unconditionally.

Previous Next

Package: guix;

Reported by: Roel Janssen <roel <at> gnu.org>

Date: Fri, 17 Nov 2017 12:17:02 UTC

Severity: normal

Done: Roel Janssen <roel <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: ludo <at> gnu.org (Ludovic Courtès)
To: Roel Janssen <roel <at> gnu.org>
Cc: 29337-done <at> debbugs.gnu.org
Subject: bug#29337: Bash reads system-wide bashrc unconditionally.
Date: Tue, 21 Nov 2017 09:50:01 +0100
Heya,

Roel Janssen <roel <at> gnu.org> skribis:

> Roel Janssen <roel <at> gnu.org> skribis:
>
>>> On CentOS 7, the following happens (yes, I added the echo-statement to
>>> /etc/bashrc on CentOS as well):
>>> $ env - bash --init-file <(echo "echo \"Goodbye, world\"") -i
>>> Goodbye, world
>>>
>>> On GuixSD:
>>> $ env - bash --init-file <(echo "echo \"Goodbye, world\"") -i
>>> Hello, world
>>> Goodbye, world

> Well it seems that it isn't ignored when it ought to be ignored -> when
> specifying --init-file.  This is a difference between how Bash works on
> CentOS 7, and how Bash works on Guix(SD).  I can't find a
> user-configurable option to make it work the same as on CentOS 7.

Now, we’re compiling Bash with "-DSYS_BASHRC='\"/etc/bashrc\"'".  I
wonder if removing that flag solves the --init-file case.

Ludo’.




This bug report was last modified 7 years and 166 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.