On Jul 19, 12:42pm, Barry Howard wrote:
> Subject: Re: Home directory layouts...
>
> A question we have is, has anyone developed a method of cross platform dotfiles
> so that a user can have a single home directory in AFS on multiple Unix like
> platforms? Currently we segregate dotfiles into separate subdirectories
> (/hpux, /sunos, ...) in each user's home directory.
>
>-- End of excerpt from Barry Howard
I automount /usr/local on all the machines here. I keep a default .cshrc and
.login in /usr/local/lib as /usr/local/lib/Cshrc and /usr/local/lib/Login.
I am sure they can both be cleaned up a bit. I have all users source these
files first in their .files and then make any changes they like.
If BSD is set to 1 before Cshrc is source it will try to set up the path on
solaris 2.x machines in a BSD way.
The lsauto script just helps prevent confusion with the automounter. If there is
interest I can email it out as well.
These versions work for sunos 4.1.x, solaris 2.3, and IRIX 5.2, but the same
type of thing should work for all versions of UNIX.
Cshrc :
# @(#)
#
# Butch Deal
# Universal Cshrc version 2.3
#
# See if this is sunos or not
#
umask 022
set osvender=`uname`
if ($osvender == "SunOS") then # a Sun machine
setenv OPENWINHOME /usr/openwin
setenv LD_LIBRARY_PATH /usr/lib:${OPENWINHOME}/lib
setenv FONTPATH ${OPENWINHOME}/lib/fonts
endif
#
# See if this a Solaris 1.1 (4.1.3) machine or a Solaris 2.x (5.x) machine.
# The variable "osversion" is 5 if this a 2.x machine, 4 for solaris 1.1
#
set osversion=`uname -r | cut -c1`
#
# Set basic path and initialize OS specific environment variables
#
if ($osvender == "IRIX") then # a SGI machine
setenv PATH /usr/bsd
set path = ($path /bin)
set path = ($path /usr/bin)
set path = ($path /usr/sbin)
set path = ($path /usr/bin/X11)
set path = ($path /etc)
set path = ($path /usr/etc)
set path = ($path /usr/local/bin)
set path = ($path .)
setenv MANPATH
/usr/catman:/usr/local/catman:/usr/local/fore_atm/catman:/usr/share/catman
alias hostname "uname -n"
set mail=(300 /usr/mail/${user})
setenv VISUAL /bin/vi
setenv EDITOR /bin/vi
else
set mail=(300 /usr/spool/mail/${user})
if ($osversion == "5") then # a 2.x machine
setenv PATH /opt/SUNWspro/SC2.0.1
set path = ($path /opt/SUNWspro/SW2.0.1/bin)
#setenv PATH /opt/SUNWspro/bin
set path = ($path /opt/SUNWspro/bin)
set path = ($path /usr/ccs/bin)
#set path = ($path /usr/bin/X11)
set path = ($path /usr/openwin/bin)
set path = ($path /opt/SUNWwabi/bin)
set path = ($path /opt/SUNWmotif/bin)
if ( $?BSD == 1 ) then
set path = ($path /usr/ucb)
set path = ($path /usr/bin)
else
set path = ($path /usr/bin)
set path = ($path /usr/ucb)
endif
set path = ($path /usr/sbin)
set path = ($path /etc)
set path = ($path /opt/NeWSprint/bin)
set path = ($path /usr/local/bin)
set path = ($path /afs/ait/@sys/bin)
set path = ($path .)
setenv OS_ROOTDIR /opt/ostore
setenv LD_LIBRARY_PATH
/opt/SUNWspro/lib:${LD_LIBRARY_PATH}:/opt/SUNWmotif/lib:${OS_ROOTDIR}/lib
setenv LD_RUN_PATH $LD_LIBRARY_PATH
setenv MANPATH
${OPENWINHOME}/man:/opt/SUNWspro/man:/opt/SUNWwabi/man:/usr/man:/usr/local/man:/opt/NeWSprint/man
setenv LPDEST 213hp
setenv metamail /usr/local/bin/metamail
limit coredumpsize 0
else # a 4.1.x machine
setenv PATH /usr/lang
set path = ($path /usr/ucb)
set path = ($path /usr/bin/X11)
set path = ($path /usr/openwin/bin)
set path = ($path /usr/bin)
set path = ($path /usr/5bin)
set path = ($path /etc /usr/etc)
set path = ($path /usr/local/bin)
set path = ($path .)
setenv LD_LIBRARY_PATH /usr/lang/SC2.0.1:$LD_LIBRARY_PATH
setenv MANPATH
/usr/man/X11:${OPENWINHOME}/man:/usr/lang/man:/usr/man:/usr/local/man
setenv FONTPATH /usr/lib/fonts:$FONTPATH
alias xwin "exec xwin"
setenv PRINTER 213hp
endif
setenv VISUAL /usr/ucb/vi
setenv EDITOR /usr/ucb/vi
endif
# NB: Moving /usr/ucb/ to the end of the path hides many of the Berkeley
# binaries with their Sys V cousins. This is the default on 2.1. You
# may change this, but you will extend your portability problems.
#
# Add interactive stuff here...
#
if ( $?prompt != 0 ) then
if ( $?TERM != 0 ) then
if ( "$term" == "xterm" || "$term" == "vs100" ) then
setenv HOST `hostname`
alias cd 'set old=$cwd; chdir \!* ; echo -n "]2;${HOST}: ${cwd}"'
echo "]2;${HOST}: ${cwd}"
endif
else
alias cd 'set old=$cwd;chdir \!*;'
endif
set filec
set history=33
set savehist=20
set ignoreeof
set prompt = "(\!) `hostname` % "
endif
alias a alias
alias pwd 'echo "${cwd}"'
alias c clear
alias dir pwd
alias h "history -r | more"
alias j "jobs -l"
alias la "ls -A"
alias list "ls -l"
alias ll "ls -lg"
alias ls "ls -FC"
alias s screenrestore
alias dc 'set back=$old; set old=$cwd; cd $back; unset back'
alias whois '/usr/local/bin/whois '
alias ls "/usr/local/bin/lsauto -FC "
setenv SHELL /bin/csh
setenv NNTPSERVER news.nrl.navy.mil
setenv XRSH_AUTH_TYPE environment
setenv XAUTHORITY ${HOME}/.Xauthority
setenv PVM_ROOT /proj/pvm/pvm3
Login :
# @(#)login 1.7 89/09/05 SMI
set noglob
eval `tset -Q -I -s -m 'dialup:vt100'`
if ( $?prompt ) then
if ( "$TERM" == "vt100" ) then
stty erase '^?'
else
stty erase '^H'
endif
echo "Last 10 logins on this machine:"
last -10
endif
unset noglob
--
#include <std/*>
The Butcher
Butch Deal [EMAIL PROTECTED]
--------------------------------------------------------------------------------