From owner-freebsd-questions@FreeBSD.ORG Wed May 7 23:54:26 2014 Return-Path: Delivered-To: questions@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3047A557 for ; Wed, 7 May 2014 23:54:26 +0000 (UTC) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E8C0BECB for ; Wed, 7 May 2014 23:54:25 +0000 (UTC) Received: from r56.edvax.de (port-92-195-108-40.dynamic.qsc.de [92.195.108.40]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx01.qsc.de (Postfix) with ESMTPS id 2C41C3CEAA; Thu, 8 May 2014 01:54:21 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id s47NsLjK003469; Thu, 8 May 2014 01:54:21 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Thu, 8 May 2014 01:54:21 +0200 From: Polytropon To: Fbsd8 Subject: Re: csh environment variables Message-Id: <20140508015421.fcba64ad.freebsd@edvax.de> In-Reply-To: <536AC430.8050400@a1poweruser.com> References: <536AC430.8050400@a1poweruser.com> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: questions X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 23:54:26 -0000 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, ...