[Next] [Previous] [Up] [Top] [Contents] [Index]
Appendix C. Fermi Login Files
The default FUE .cshrc
file is found in /usr/local/etc/stdcshrc
.
# .cshrc default settings for all users # @(#) stdcshrc 1.10 Delta: 93/08/19 14:51:27 Extraction 94/07/06 15:16:15 @(#) # execute fermi.cshrc first if ( -r /usr/local/etc/fermi.cshrc ) then source /usr/local/etc/fermi.cshrc endif # Place any items that you want executed even for non-interactive use here #skip if not interactive shell if ( $?USER == 0 || $?prompt == 0 ) exit set noclobber #prevent overwrite when redirecting output set ignoreeof #prevent accidental logouts # Have mail point to fermimail which is a Berkely mail version. Some packages # expect mail to be a System V version of mail. If you are having problems # of this type, you may need to remove the alias. alias mail fermimail #Fermi recommended Mail #Define various aliases; user selects desired alias by removng the # sign #alias a alias #alias killit kill -9 #guarantees that a process is killed #alias h 'history | tail' #alias ll ls -l #alias la ls -a #see hidden files #alias lf ls -CF #check file TYPE (exe, dir ..) #alias rmi rm -i #confirm before deletion #alias home cd #HOME #alias side 'cd ../\!*' #side #alias down 'cd \!*' #down #alias up cd .. #up #alias cpi cp -i #no overwrite of output file #alias cd 'cd \!*;echo $cwd' #alias mvi mv -i #confirm before moving #Next alias replaces standard info command on SGI platforms #alias info Info #get list of info articles # #VMS type commands # #alias dir ls -l #alias copy cp #alias rename mv
.cshrc
executes /usr/local/etc/fermi.cshrc
.
The default FUE fermi.cshrc
file is found in /usr/local/etc/fermi.cshrc
.
# @(#) fermi.cshrc 4.32 Delta: 94/09/29 22:22:46 Extraction 94/09/29 22:34:39 @( #) # fermi.cshrc settings for all users; will be called by the default .cshrc set MACH_ID=`/usr/local/bin/funame -n` set MACH_TYPE=`/usr/local/bin/funame -m` set MACH_OS=`/usr/local/bin/funame -s` #Determine if this is the first time the fermi.cshrc file has been executed #on this machine if ($?FERMICSHRC) then if ( $FERMICSHRC == "$MACH_ID" ) then set firsttime=0 else set firsttime=1 setenv FERMICSHRC "$MACH_ID" endif else setenv FERMICSHRC "$MACH_ID" set firsttime=1 endif #Execute the things that are only done the first time through if ( $firsttime == "1" ) then # set path if ( -r /usr/local/etc/setpath.csh ) then source /usr/local/etc/setpath.csh endif # # Establish MANPATH # setenv MANPATH /usr/products/catman:/usr/products/man:/afs/fnal/products /catman:/afs/fnal/products/man:/usr/catman:/usr/man:/usr/share/catman:/usr/share /man:/usr/local/catman:/usr/local/man endif #Execute the items done each time (basically only aliases) # # Setup UPS # if ( -r /usr/local/etc/setups.csh ) then source /usr/local/etc/setups.csh endif switch ($MACH_OS) case IRIX: alias fermimail '/usr/sbin/Mail' # Berkely mail breaksw case SunOS: alias fermimail '/usr/ucb/Mail' # Berkely mail alias man 'man -F' breaksw case AIX: alias fermimail '/usr/ucb/Mail' #Berkely Mail breaksw case ULTRIX: alias fermimail '/usr/ucb/Mail' # Berkely Mail breaksw case OSF1: alias fermimail '/usr/bin/Mail' # Berkely Mail breaksw case HP-UX: alias fermimail '/usr/bin/mailx' #Berkely Mail breaksw default if ( -x /usr/ucb/Mail ) then alias fermimail '/usr/ucb/Mail' #Berkely Mail endif if ( -x /usr/sbin/Mail ) then alias fermimail '/usr/sbin/Mail' #Berkely Mail endif if ( -x /usr/bsd/Mail ) then alias fermimail '/usr/bsd/Mail' #Berkely Mail endif if ( -x /usr/bin/mailx ) then alias fermimail '/usr/bin/mailx' #Berkely Mail endif if ( -x /usr/bin/Mail ) then alias fermimail '/usr/bin/Mail' #Berkely Mail endif breaksw endsw # # Check for existance of local.cshsrc file. This is the file admins should # put in any changes, additions, etc. so that they don't need to re-edit this # file every release. # if ( -r /usr/local/etc/local.cshrc ) then source /usr/local/etc/local.cshrc endif
fermi.cshrc
calls /usr/local/etc/setpath.csh
to set the shell variable path, and it executes /usr/local/etc/setups.csh
to set up ups.
The default FUE setpath.csh
file is found in /usr/local/etc/setpath.csh
.
# @(#) setpath.csh 1.7 Delta: 95/03/22 22:13:29 Extraction 95/03/22 22:13:53 @(# ) if ($?HOME == 0 ) then setenv HOME / endif set path="" foreach DIR ( /usr/sbin \ /opt/SUNWspro/bin \ /usr/ccs/bin \ /usr/lang \ /usr/bsd \ /bin \ /usr/bin \ /usr/lbin \ /usr/ucb \ /etc \ /usr/etc \ /usr/afsws/bin \ /usr/openwin/bin \ /usr/bin/X11 \ /usr/kinet/bin \ /usr/local/bin \ /usr/bin/mh \ /usr/sccs ) if ( -d $DIR ) then set path=($path $DIR) endif end # # Add your HOME/bin and bin."flavor" # Put your Sun executables in a bin named bin.SunOS, # your IRIX executables in bin.IRIX, # your AIX " " bin.AIX, # ...etc... # # Do not do this if you are root, because //bin is your # $HOME/bin, and do not put current directin in root's path if ($?MACH_OS == 0) then set MACH_OS=`funame -s` endif if ( "$HOME" != "/" ) then foreach DIR ( $HOME/bin.$MACH_OS $HOME/bin ) if ( -d $DIR ) then set path=($DIR $path) endif end set path=($path .) endif
The default FUE setups.csh
file is found in /usr/local/etc/setups.csh
.
#Set environment for UPS if (! -r ~/.noupsproducts) then #start if .noupsproducts set MACH_OS=`funame -s` set setprod=no if ( $?PRODUCTS == 0 ) then set setprod=yes else set fchar=`echo $PRODUCTS | cut -c1` if ( "x/" != x"$fchar" ) then set setprod=yes endif endif if ( $setprod == "yes" ) then #start if $PRODUCTS already set if ( $?UPS_EXTRA_DIR == 0 ) then set UPS_EXTRA_DIR="" endif unsetenv PRODUCTS # Add other directories areas that might be product databases # to the foreach list foreach PROD ( $UPS_EXTRA_DIR \ /`funame -n`/products/ups_database/declared \ `logdir products`/ups_database/declared \ /usr/products/ups_database/declared \ /afs/fnal/products/ups_database/declared) if (-d $PROD) then if ($?PRODUCTS) then set exists=`echo $PRODUCTS | grep -c $PR OD` if ( $exists == "0" ) then setenv PRODUCTS "$PRODUCTS $PROD " endif else setenv PRODUCTS $PROD endif endif end endif #end if $PRODUCTS already set if ($?PRODUCTS) then #set if $PRODUCTS set set setups=no if ( $?UPS_DIR == 0 ) then set setups=yes else set fchar=`echo $UPS_DIR | cut -c1` if ( "x/" != x"$fchar" ) then set setups=yes endif endif if ( $setups == "yes" ) then #start if $UPS_DIR already set set setups=no set full=${MACH_OS}+`funame -r` foreach PROD ( $PRODUCTS ) if ( -r $PROD/ups ) then if ( `grep -c "current.$MACH_OS" $PROD/ups` == 0 ) then continue endif foreach i ( `grep "current.$MACH_OS" $PROD/ups|a wk '{print $2}'|sort -r` ) if ( $full =~ $i* ) then set flavor=$i break endif end if ( $?flavor == 0 ) then continue endif #characater after ${flavor} and before " is tab (next 2 lines) set CURRENT=`grep "current.${flavor} " $PROD/ ups|awk '{print $3}'` setenv UPS_DIR `grep "^Instance:.*${flavor} " ${PROD}/ups|grep \"${CURRENT}\"|awk '{print $4}'` set fchar=`echo $UPS_DIR | cut -c1` if ( "x/" == x"$fchar" ) then set setups=yes break endif endif end if ($?UPS_DIR) then if ( -r $UPS_DIR/ups/ups_init ) then source $UPS_DIR/ups/ups_init setup ups endif endif endif #end if $UPS_DIR already set #Even though UPS_DIR may have already been setup, aliases aren't always # passed along, thus we need to always do the source of ups_init and # the setup.csh file. We can't simply do a setup of ups, because then you # get the current version of ups instead of the version of UPS when you # entered this process. The setup of ups relies on UPS_PROD_VERSION being # set (although not in a serious way). This process assumes the version is # the last component of the $UPS_DIR directory. This isn't guaranteed to be # correct, but will work ok for this situation. if ($?UPS_DIR) then #start if $UPS_DIR is set if ( -r $UPS_DIR/ups/ups_init ) then setenv UPS_PROD_VERSION `basename $UPS_DIR` source $UPS_DIR/ups/ups_init if ( -r $UPS_DIR/ups/setup.csh ) then source $UPS_DIR/ups/setup.csh endif unsetenv UPS_PROD_VERSION else echo '$UPS_DIR set, but $UPS_DIR/ups/ups_init do esnt exist, ups environment not setup' endif else echo 'Unable to set $UPS_DIR, ups environment not setup' endif #end if $UPS_DIR set else echo 'Unable to set $PRODUCTS, ups environment not setup' endif #end if $PRODUCTS set endif #end if .noupsproducts
The default FUE .login
file is found in /usr/local/etc/stdlogin
.
# .login default settings for all users #@(#) stdlogin 1.6 Delta: 92/11/05 14:17:45 Extraction 94/07/06 15:16:16 @(#) # # .login default settings for all users # # execute fermi.login first # if ( -r /usr/local/etc/fermi.login ) then source /usr/local/etc/fermi.login endif # # defines alias for cedit, comment out if not wanted # if ( ! -e ~/.noupsproducts ) then setup cedit endif # # Next line sets prompt to <machine_name> # set prompt="<$MACH_ID> " # # The standard fermi.profile does not attempt to include /usr/5bin # (in SunOS) in your PATH. /usr/5bin contains the UNIX System V version # of several commands. By including /usr/5bin first, you will get the # System V version before the BSD version. Uncomment one of the following # if you so desire: # #set path=(/usr/5bin $path) #set path=($path /usr/5bin) # # The savehist & history settings maybe expanded to 100 # set savehist=20 #save last 20 commands for next session set history=20 #retain the last 20 commands # # Uncomment the following to change... # #stty kill '^u' # sets line kill to <ctrl-u> #stty erase '^H' # sets erase to backspace #stty intr '^?' # sets interrupt to delete
The .login
file executes the file /usr/local/etc/fermi.login
.
The default FUE fermi.login
file is found in /usr/local/etc/fermi.login
.
# @(#) fermi.login 4.31 Delta: 94/09/29 22:31:20 Extraction 94/09/29 22:34:39 @( #) # # fermi.login settings for all users; called by the default .login # Set the umask so that newly created files and directories will be readable # by others, but writable only by the user. # umask 022 # # Following put in to handle NQS # if ( $?ENVIRONMENT ) then if ( $ENVIRONMENT == "BATCH" ) exit endif # # Determine terminal type # set ttype=`echo $term |cut -c1` switch (x$term) case x: case xunknown: case xarpanet: case xnetwork: case xnet: case xdialup: case xdumb: set term=vt100 stty erase '^?' breaksw default if ( -r /usr/lib/terminfo/$ttype/$term || -r /usr/share/lib/terminfo/$tt ype/$term ) then switch ($term) case iris-ansi: case iris-ansi-net: case hp: stty erase '^h' breaksw default stty erase '^?' breaksw endsw else set bterm=`echo $term | cut -c1-3` if ( -r /usr/lib/terminfo/$ttype/$bterm || -r /usr/share/lib/ter minfo/$ttype/$bterm ) then set term=$bterm stty erase '^?' else switch ($MACH_OS) case IRIX: case SunOS: case AIX: switch ($bterm) case vt2: case vt3: set term=vt220 stty erase '^?' breaksw default set term=vt100 stty erase '^?' breaksw endsw breaksw case ULTRIX: switch ($bterm) case vt3: set term=vt300 stty erase '^?' breaksw case vt2: set term=vt200 stty erase '^?' breaksw default set term=vt100 stty erase '^?' breaksw endsw breaksw case OSF1: switch ($bterm) case vt2: case vt3: stty erase '^?' breaksw default set term=vt100 stty erase '^?' breaksw endsw breaksw default set term=vt100 stty erase '^?' breaksw endsw endif endif breaksw endsw # # Set DISPLAY # if ( ! $?DISPLAY ) then set TTYPORT=`tty` if ( $TTYPORT == /dev/console ) then setenv DISPLAY "localhost:0" else if ( $?REMOTEHOST ) then setenv DISPLAY "${REMOTEHOST}:0" else set TTYNAME=`echo $TTYPORT |cut -c6-` set REMOTEHOST=`who|grep "$TTYNAME"|awk '{print $6}'|sed 's/(//' |sed 's/)//'` setenv DISPLAY "${REMOTEHOST}:0" endif endif # # Who are you? # if ( $?LOGNAME ) then setenv LOGNAME "$LOGNAME" else if ( $?USER ) then setenv LOGNAME "$USER" else if ( $?REMOTEUSER ) then setenv LOGNAME "$REMOTEUSER" endif # # The switch statement is to set the mail variable # based on machine type. Also motd and news are # dependent on system type. Some systems automatically # display motd (and thus shouldn't be repeated here. # Others don't have news. # switch ($MACH_OS) case IRIX: setenv TZ CST6CDT if ( `funame -r|cut -c1` == 3 ) then set mail=/usr/mail/$LOGNAME if ( { /bin/mail -e } ) then echo 'You have mail.' endif endif if ( { test -d /usr/news } ) then /usr/bin/news endif breaksw case SunOS: setenv TZ CST6CDT set mail=/usr/spool/mail/$LOGNAME breaksw case AIX: setenv TZ CST6CDT /bin/news setenv MAIL "/usr/spool/mail/$LOGNAME" setenv MAILMSG "[YOU HAVE NEW MAIL]" if ( { test -s $MAIL } ) then echo 'You have mail.' endif setenv EMULATE none breaksw case ULTRIX: set mail=/usr/spool/mail/$USER breaksw case OSF1: /usr/bin/news set mail=/usr/spool/mail/$USER breaksw case HP-UX: setenv TZ CST6CDT cat -s /etc/motd /usr/bin/news set mail=/usr/mail/$LOGNAME if ( { /bin/mail -e } ) then echo 'You have mail.' endif breaksw case "": #If for some reason funame -s returns NULL, as opposed to returning #something that isn't recognized, do nothing breaksw default cat -s /etc/motd if ( -x /usr/bin/news) then /usr/bin/news endif if ( -x /bin/news) then /bin/news endif if ( -d /usr/spool/mail ) then set mail=/usr/spool/mail endif if ( -d /usr/mail ) then set mail=/usr/mail/$LOGNAME endif if ( -x /bin/mail ) then if ( { /bin/mail -e } ) then echo 'You have mail.' endif endif breaksw endsw # # Establish PAGER # if ( -r /usr/local/bin/less ) then setenv PAGER /usr/local/bin/less else setenv PAGER more endif # # Common terminal characteristics # stty intr '^c' # set interrupt key to <ctrl-c> stty kill '^x' # set kill key to <ctrl-x> stty echoe # erase ERASEd characters echo "Terminal Type is $TERM" /usr/local/bin/Info -new # # Some systems the user doesn't own his tty device ( Sun OpenWindows) so # redirect stderr # /bin/chmod 622 `tty` >& /dev/null # # Check for existance of local.cshsrc file. This is the file admins should # put in any changes, additions, etc. so that they don't need to re-edit this # file every release. # if ( -r /usr/local/etc/local.login ) then source /usr/local/etc/local.login endif