bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bash does not run startup files


From: Chuck Harding
Subject: Re: bash does not run startup files
Date: Wed, 11 Mar 2009 14:14:36 -0700 (PDT)
User-agent: Alpine 1.10 (LRH 962 2008-03-14)

On Wed, 11 Mar 2009, Pierre Gaston wrote:

On Tue, Mar 10, 2009 at 8:42 PM, root <root@ghostwheel.llnl.gov> wrote:
Configuration Information [Automatically generated, do not change]:
Machine: i686
OS: linux-gnu - Red Hat Enterprise Linux Client release 5.3 (Tikanga)
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' 
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu' 
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL 
-DHAVE_CONFIG_H   -I.  -I. -I./include -I./lib   -g -O2
uname output: Linux ghostwheel.llnl.gov 2.6.28.7 #1 SMP PREEMPT Mon Feb 23 
11:37:50 PST 2009 i686 i686 i386 GNU/Linux
Machine Type: i686-pc-linux-gnu

Bash Version: 4.0
Patch Level: 10
Release Status: release

Description:
       no matter how I invoke bash, it will not run any of the startup scripts: 
/etc/profile, ~/.bash_profile, ~/.bashrc - this is either being started by 
/bin/login or in an xterm session

Repeat-By:
       login with /etc/passwd specifying /bin/bash as shell
       exec /bin/bash --login --interactive
       xterm
       xterm -e /bin/bash -l -i


It works for me, what makes you think that they are not loaded?

can you paste the output of:
strace -e trace=open bash -i -c 'echo $BASH_VERSION;exit'
and
strace -e trace=open bash -i -l -c 'echo $BASH_VERSION;exit'




Well, for one thing, at the beginning of .bashrc and .bash_profile I put
a command like "echo start <thisfile>" and at the end I put a command
like "echo exit <thisfile>" where <thisfile> is the name of the containing
script and I never see the output from those echo commands. Here is the
output from the strace commands:

~ 9 14:00:39) strace -e trace=open bash -i -c 'echo $BASH_VERSION;exit'
open("/etc/ld.so.cache", O_RDONLY)      = 3
open("/lib/libtermcap.so.2", O_RDONLY)  = 3
open("/lib/libdl.so.2", O_RDONLY)       = 3
open("/lib/libc.so.6", O_RDONLY)        = 3
open("/dev/tty", O_RDWR|O_NONBLOCK|O_LARGEFILE) = 3
open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = 3
open("/proc/meminfo", O_RDONLY)         = 3
open("/etc/nsswitch.conf", O_RDONLY)    = 3
open("/etc/ld.so.cache", O_RDONLY)      = 3
open("/lib/libnss_files.so.2", O_RDONLY) = 3
open("/etc/passwd", O_RDONLY)           = 3
open("/usr/lib/gconv/gconv-modules.cache", O_RDONLY) = 3
open("/proc/sys/kernel/ngroups_max", O_RDONLY) = 3
4.0.10(5)-release
exit

~ 14:12:30$ strace -e trace=open bash -i -l -c 'echo $BASH_VERSION;exit'
open("/etc/ld.so.cache", O_RDONLY)      = 3
open("/lib/libtermcap.so.2", O_RDONLY)  = 3
open("/lib/libdl.so.2", O_RDONLY)       = 3
open("/lib/libc.so.6", O_RDONLY)        = 3
open("/dev/tty", O_RDWR|O_NONBLOCK|O_LARGEFILE) = 3
open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = 3
open("/proc/meminfo", O_RDONLY)         = 3
open("/etc/nsswitch.conf", O_RDONLY)    = 3
open("/etc/ld.so.cache", O_RDONLY)      = 3
open("/lib/libnss_files.so.2", O_RDONLY) = 3
open("/etc/passwd", O_RDONLY)           = 3
open("/usr/lib/gconv/gconv-modules.cache", O_RDONLY) = 3
open("/proc/sys/kernel/ngroups_max", O_RDONLY) = 3
4.0.10(5)-release
open("/usr/share/locale/locale.alias", O_RDONLY) = 3
open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/bash.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale/en_US.utf8/LC_MESSAGES/bash.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale/en_US/LC_MESSAGES/bash.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale/en.UTF-8/LC_MESSAGES/bash.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale/en.utf8/LC_MESSAGES/bash.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale/en/LC_MESSAGES/bash.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
logout
open("/home/charding/.bash_logout", O_RDONLY|O_LARGEFILE) = 3
--- SIGCHLD (Child exited) @ 0 (0) ---
Bye! Have a nice day!
~ 14:12:35$

--
Charles D. (Chuck) Harding   <charding@llnl.gov>    Voice: 925-423-8879
Senior Computer Technologist   LC Operations          Fax: 925-423-8715
B453 R2253/2131  Pager: 00500  Ops Room: 925-422-3743 Ops: 925-422-0484
Lawrence Livermore National Laboratory          Computation Directorate
Livermore, CA USA    http://www.llnl.gov    GPG Public Key ID: B9EB6601
-------------------- http://tinyurl.com/5w5ey -------------------------
-------------------- http://tinyurl.com/4urrb2 ------------------------
-- It works better if you plug it in. --

reply via email to

[Prev in Thread] Current Thread [Next in Thread]