From owner-freebsd-bugs Fri Mar 14 09:10:04 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id JAA29076 for bugs-outgoing; Fri, 14 Mar 1997 09:10:04 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id JAA29067; Fri, 14 Mar 1997 09:10:02 -0800 (PST) Date: Fri, 14 Mar 1997 09:10:02 -0800 (PST) Message-Id: <199703141710.JAA29067@freefall.freebsd.org> To: freebsd-bugs Cc: From: " steve howe" Subject: Re: bin/2934: sh(1) has problems with $ENV Reply-To: " steve howe" Sender: owner-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk The following reply was made to PR bin/2934; it has been noted by GNATS. From: " steve howe" To: sprice@hiwaay.net Cc: FreeBSD-gnats-submit@freefall.freebsd.org, freebsd-bugs@freefall.freebsd.org Subject: Re: bin/2934: sh(1) has problems with $ENV Date: Fri, 14 Mar 1997 09:02:22 -0800 (PST) >Date: Mon, 10 Mar 1997 23:10:57 -0600 >From: Steve Price >To: un_x@hotmail.com >CC: FreeBSD-gnats-submit@freefall.freebsd.org, >Subject: Re: bin/2934: sh(1) has problems with $ENV >steve howe wrote: >> >> >Number: 2934 >> >Category: bin >> >Synopsis: sh(1) has problems with $ENV >> >> /bin/sh in any FreeBSD system so far. >> >> >Description: >> >> /bin/sh processes $ENV fine if it has been set inside ~/.profile like: >> >> ENV=${HOME}/.env; export ENV >> >> However, it fails to source $ENV in this case: >> >> export ENV=${HOME}/.env >> >> >How-To-Repeat: >> >> Use: >> >> export ENV=${HOME}/.env >> >> in your ~/.profile, and re-invoke another level of sh(1). $ENV won't >> be read. Now invoke any other Bourne-alike shell (pdksh, ksh93, >> bash), it will process $ENV correctly. >> > >I tried this and it didn't appear to work at first, but I believe >it is because of this. > >steve[~]$ grep steve /etc/passwd >steve:*:1000:1000:Steve Price:/home/steve:/bin/bash >steve[~]$ echo $ENV >/home/steve/.bashrc >steve[~]$ cat /home/steve/.bashrc >steve[~]$ cat /home/steve/.profile >export ENV=${HOME}/env-stuff >echo ~/.profile >steve[~]$ cat /home/steve/env-stuff >echo "Yep I'm here!" >steve[~]$ sh >\u[\w]\$ exit >steve[~]$ > >But after I change my login shell to /bin/sh or do a >export ENV=${HOME}/env-stuff. It works as suspected. It appears >to be a problem in that ~/.bash_profile is getting sourced and >ENV is picked up from there. The reason that this would matter >is that ~/.profile (or ~/.bash_profile for bash's case) is only >getting sourced when it is started as a login shell. So just >typing 'sh' will not source ~/.profile, but will source $ENV (which >was set by your login shell) if your euid == uid && egid == gid. > >Could this be the case with you as well? > i'm not sure exactly what you want to know from me - but i am only using "sh" - no other shells. > >> >> Not known. >> >> >Audit-Trail: >> >Unformatted: >> [This PR sent by joerg on behalf of Steve who doesn't have a good >> enough IP connectivity.] > --------------------------------------------------------- Get Your *Web-Based* Free Email at http://www.hotmail.com ---------------------------------------------------------