Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Jan 1997 13:01:01 +1100 (EST)
From:      Julian Assange <proff@iq.org>
To:        hackers@freebsd.org
Subject:   envfs and /usr/share/skel/* stupidity
Message-ID:  <199701070201.NAA01908@profane.iq.org>

next in thread | raw e-mail | index | archive | help
dot.cshrc, dot.login and dot.profile are brain-dead. they set PATH,
TERM VI, MANPATH and a number of other enviromental variables, as
well as umask and various mail stuff.

NONE of these should be set by default. it totally destroys the concept
of central management, and the TERM case breaks remote logins.

dot.* should not do anything, and should merely be provided for as
a (commented out!) template. Everything here should be moved into
/etc/profile /etc/csh.cshrc etc.

Personally, use a psuedo "envfs" /etc/env which contains system
defaults for PATH, MANPATH, INFOPATH, EDITOR, PAGER etc.

/etc/profile, /etc/rc (etc) then does:

if cd /etc/env
then
        for n in *
        do
                read v<$n
                eval $n=$v
        done
        cd -
fi

and in my dot.profile

if cd $HOME/env
then
        for n in *
        do
                read v<$n
                eval $n=$v
        done
        cd -
fi

which gives the user their own "envfs". Note that because eval is
used, it is possible to have "`cat /etc/nntpserver`" etc, as the
entry for NNTPSERVER

-Julian <proff@iq.org>



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