Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Oct 1999 12:05:50 +0200
From:      Sheldon Hearn <sheldonh@uunet.co.za>
To:        "Nathaniel Schein" <nschein@prisa.com>
Cc:        "Freebsd Questions" <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Variables / Environments 
Message-ID:  <44769.941105150@axl.noc.iafrica.com>
In-Reply-To: Your message of "Wed, 27 Oct 1999 16:56:56 MST." <47dd27ada65e72afb566ded9a0ab629d38179159@(null)> 

next in thread | previous in thread | raw e-mail | index | archive | help


On Wed, 27 Oct 1999 16:56:56 MST, "Nathaniel Schein" wrote:

> I am tasked with migrating a version 2.1.0 system to a 3.2 system. We are
> using NIS and AMD. The previous sys admin incorporated an ${ARCH} variable
> into the sysconfig file that became a system or global variable. The
> statement is:

Wow, sysconfig -- that was a while ago. The files /etc/defaults/rc.conf
and /etc/rc.conf replace its functionality.

> ARCH=`uname -s`/`uname -r`/`uname -m` export ARCH

> My questions are, what are the different environments in FreeBSD, what runs
> in them and how does one gain access to them? How does one define a global
> variable?

This would have set the variable ARCH for any script that sucked in
/etc/sysconfig . Your login shell doesn't source /etc/sysconfig, so that
variable isn't set.

> Also, I put the ARCH statement in the rc.conf file and referenced it through
> AMD by:
> 
> bin     type:=nfs;rhost:=g;rfs:=/usr/people/share/${ARCH}/${key}
> 
> this is the same statement used in the 2.1.0 system but the system does not
> expand what is between `and`. The 3.2 system only sees:

AMD isn't a shell script, so it doesn't ``source'' your map file and
shell variable expansion inside the mapfile isn't possible.

Ciao,
Sheldon.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




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