Print this page
3395 add /etc/profile.d and /etc/.login.d


   4 # Common Development and Distribution License, Version 1.0 only
   5 # (the "License").  You may not use this file except in compliance
   6 # with the License.
   7 #
   8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9 # or http://www.opensolaris.org/os/licensing.
  10 # See the License for the specific language governing permissions
  11 # and limitations under the License.
  12 #
  13 # When distributing Covered Code, include this CDDL HEADER in each
  14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15 # If applicable, add the following below this CDDL HEADER, with the
  16 # fields enclosed by brackets "[]" replaced with your own identifying
  17 # information: Portions Copyright [yyyy] [name of copyright owner]
  18 #
  19 # CDDL HEADER END
  20 #
  21 # Copyright 1998 Sun Microsystems, Inc.  All rights reserved.
  22 # Use is subject to license terms.
  23 #
  24 #ident  "%Z%%M% %I%     %E% SMI"

  25 
  26 # The initial machine wide defaults for csh.
  27 
  28 if ( $?TERM == 0 ) then
  29         if { /bin/i386 } then
  30                 setenv TERM sun-color
  31         else
  32                 setenv TERM sun
  33         endif
  34 else
  35         if ( $TERM == "" ) then
  36                 if { /bin/i386 } then
  37                         setenv TERM sun-color
  38                 else
  39                         setenv TERM sun
  40                 endif
  41         endif
  42 endif
  43 
  44 if (! -e .hushlogin ) then
  45         /usr/sbin/quota
  46         /bin/cat -s /etc/motd
  47         /bin/mail -E
  48         switch ( $status )
  49         case 0: 
  50                 echo "You have new mail."
  51                 breaksw;
  52         case 2: 
  53                 echo "You have mail."
  54                 breaksw;
  55         endsw
























  56 endif


   4 # Common Development and Distribution License, Version 1.0 only
   5 # (the "License").  You may not use this file except in compliance
   6 # with the License.
   7 #
   8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9 # or http://www.opensolaris.org/os/licensing.
  10 # See the License for the specific language governing permissions
  11 # and limitations under the License.
  12 #
  13 # When distributing Covered Code, include this CDDL HEADER in each
  14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15 # If applicable, add the following below this CDDL HEADER, with the
  16 # fields enclosed by brackets "[]" replaced with your own identifying
  17 # information: Portions Copyright [yyyy] [name of copyright owner]
  18 #
  19 # CDDL HEADER END
  20 #
  21 # Copyright 1998 Sun Microsystems, Inc.  All rights reserved.
  22 # Use is subject to license terms.
  23 #
  24 # Copyright 2013 Alexander Pyhalov. All rights reserved.
  25 #
  26 
  27 # The initial machine wide defaults for csh.
  28 
  29 if ( $?TERM == 0 ) then
  30         if { /bin/i386 } then
  31                 setenv TERM sun-color
  32         else
  33                 setenv TERM sun
  34         endif
  35 else
  36         if ( $TERM == "" ) then
  37                 if { /bin/i386 } then
  38                         setenv TERM sun-color
  39                 else
  40                         setenv TERM sun
  41                 endif
  42         endif
  43 endif
  44 
  45 if (! -e .hushlogin ) then
  46         /usr/sbin/quota
  47         /bin/cat -s /etc/motd
  48         /bin/mail -E
  49         switch ( $status )
  50         case 0: 
  51                 echo "You have new mail."
  52                 breaksw;
  53         case 2: 
  54                 echo "You have mail."
  55                 breaksw;
  56         endsw
  57 endif
  58 
  59 if ( -d /etc/csh/login.d && ! -f "${HOME}/.limited_profile" ) then
  60         if ($?nonomatch) then 
  61                 set old=$nonomatch
  62         else
  63                 unset old
  64         endif
  65         set nonomatch=1
  66         foreach file ( /etc/csh/login.d/*.csh )
  67                 if ( "$file" == "/etc/csh/login.d/*.csh" ) then
  68                         break
  69                 endif
  70                 if ( -f "$file" && -r "$file" ) then
  71                         source "$file"
  72                 endif
  73         end
  74         if ($?old) then
  75                 set nonomatch="$old"
  76                 unset old
  77         else 
  78                 unset nonomatch
  79         endif
  80         unset file
  81 endif