[ale] env var's

Danny Cox danny at compgen.com
Fri Jul 28 13:36:59 EDT 2000


Patrick,

On Fri, 28 Jul 2000 tewkewl at mindspring.com wrote:
> where is the best place to srt an environment variable? (without logging in to a server)
> 
> generally when I log in I put them in my personal .profile.... But is there a .profile for the server?  I am running SuSE 2.2.14.

	Well, it depends on what you want to affect.  If you just want
the var for yourself, then place it in your .profile.  If you want
everyone on the server to get it, place it in /etc/profile.

	I've seen several constructs that will only source profiles for
certain machines (Linux, HP, SGI, Sun), and constructs that only source
profiles depending upon the hostname of the machine.  For example:

	# OS Dependent stuff
	OSNAME=`uname -s`
	test -x /etc/sysprofs/$OSNAME && . /etc/sysprofs/$OSNAME

	# Machine Dependent stuff
	HOSTNAME=`hostname` # or uname -n
	test -x /etc/hostprofs/$HOSTNAME && . /etc/hostprofs/$HOSTNAME

	# User Dependent stuff
	case $LOGNAME in
		tewkewl) set -r		# make a restricted shell
		;;
	esac

	Hope this helps!

Danny

--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.





More information about the Ale mailing list