Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 May 2014 01:54:21 +0200
From:      Polytropon <freebsd@edvax.de>
To:        Fbsd8 <fbsd8@a1poweruser.com>
Cc:        questions <questions@FreeBSD.org>
Subject:   Re: csh environment variables
Message-ID:  <20140508015421.fcba64ad.freebsd@edvax.de>
In-Reply-To: <536AC430.8050400@a1poweruser.com>
References:  <536AC430.8050400@a1poweruser.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 07 May 2014 19:39:28 -0400, Fbsd8 wrote:
> Where are the system environment variables saved at when the system 
> shuts down?

Usually nowhere. :-)

Those settings are made when a shell is started, with the
restriction that some might only be set when the shell is
an interactive shell. For the C shell, see /etc/csh.cshrc,
for root's (and any other user's) shell see ~/.cshrc and
maybe ~/.login.

Furthermore, environmental settings can be configured with
the login.conf mechanism, so have a look at /etc/login.conf
as well as ~/.login.conf for user settings.

A third option of where an "offending setting" might come
from - if it's _not_ an environmental variable - is a config
file for pkg_add or pkg.

Environmental settings usually only live as long as the shell
they have been initialized in. Shells started from that shell
could clear the environment, reset it, or inherit it. It all
depends on what mechanisms have been used.



> Looking for PACKAGESITE. Not interested in setenv or 
> unsetenv.

The PACKAGESITE is, if I remember correctly, _not_ set by
default, so you should be able to spot a "custom addition"
at one of the places mentioned.

On my home system (FreeBSD 8):

	% echo $PACKAGESITE
	PACKAGESITE: Undefined variable.

By default, it is not set.



> You have to have a running system for then to work.

And you should always have a working system to run. :-)



> Want to 
> remove system environment variable PACKAGESITE from a stand-a-lone 
> filesystem made from the base.txz file.

Examine the base.txz for any "accidental" setting of this variable.
As I said, it's probably not set by default. Currently I don't have
another system to verify if this is also true for FreeBSD 9 and 10.
If it's not in there, the setting could maybe get "inherited" from
the "upper-level OS parts" hosting the jails...


-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140508015421.fcba64ad.freebsd>