From owner-freebsd-questions Thu Oct 28 3: 7:32 1999 Delivered-To: freebsd-questions@freebsd.org Received: from axl.noc.iafrica.com (axl.noc.iafrica.com [196.31.1.175]) by hub.freebsd.org (Postfix) with ESMTP id 3C63E14D74 for ; Thu, 28 Oct 1999 03:07:05 -0700 (PDT) (envelope-from sheldonh@axl.noc.iafrica.com) Received: from sheldonh (helo=axl.noc.iafrica.com) by axl.noc.iafrica.com with local-esmtp (Exim 3.040 #1) id 11gmRK-000Be6-00; Thu, 28 Oct 1999 12:05:50 +0200 From: Sheldon Hearn To: "Nathaniel Schein" Cc: "Freebsd Questions" Subject: Re: Variables / Environments In-reply-to: Your message of "Wed, 27 Oct 1999 16:56:56 MST." <47dd27ada65e72afb566ded9a0ab629d38179159@(null)> Date: Thu, 28 Oct 1999 12:05:50 +0200 Message-ID: <44769.941105150@axl.noc.iafrica.com> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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