1ead1f93eSLiane Praza# 2ead1f93eSLiane Praza# CDDL HEADER START 3ead1f93eSLiane Praza# 4ead1f93eSLiane Praza# The contents of this file are subject to the terms of the 5ead1f93eSLiane Praza# Common Development and Distribution License (the "License"). 6ead1f93eSLiane Praza# You may not use this file except in compliance with the License. 7ead1f93eSLiane Praza# 8ead1f93eSLiane Praza# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9ead1f93eSLiane Praza# or http://www.opensolaris.org/os/licensing. 10ead1f93eSLiane Praza# See the License for the specific language governing permissions 11ead1f93eSLiane Praza# and limitations under the License. 12ead1f93eSLiane Praza# 13ead1f93eSLiane Praza# When distributing Covered Code, include this CDDL HEADER in each 14ead1f93eSLiane Praza# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15ead1f93eSLiane Praza# If applicable, add the following below this CDDL HEADER, with the 16ead1f93eSLiane Praza# fields enclosed by brackets "[]" replaced with your own identifying 17ead1f93eSLiane Praza# information: Portions Copyright [yyyy] [name of copyright owner] 18ead1f93eSLiane Praza# 19ead1f93eSLiane Praza# CDDL HEADER END 20ead1f93eSLiane Praza# 21ead1f93eSLiane Praza# Copyright 2010 Sun Microsystems, Inc. All rights reserved. 22ead1f93eSLiane Praza# Use is subject to license terms. 23d1515e52SAlexander Eremin# Copyright 2015 Nexenta Systems, Inc. All rights reserved. 24ead1f93eSLiane Praza 25ead1f93eSLiane Praza# The profile that all logins get before using their own .profile. 26ead1f93eSLiane Praza 27ead1f93eSLiane Prazatrap "" 2 3 28ead1f93eSLiane Prazaexport LOGNAME PATH 29ead1f93eSLiane Praza 30ead1f93eSLiane Prazaif [ "$TERM" = "" ] 31ead1f93eSLiane Prazathen 32d1515e52SAlexander Eremin if [ `uname -p` = "i386" ]; then 33ead1f93eSLiane Praza TERM=sun-color 34ead1f93eSLiane Praza else 35ead1f93eSLiane Praza TERM=sun 36ead1f93eSLiane Praza fi 37ead1f93eSLiane Praza export TERM 38ead1f93eSLiane Prazafi 39ead1f93eSLiane Praza 40*719d1761SToomas Soome# 41*719d1761SToomas Soome# use less(1) as the default pager for the man(1) command. 42*719d1761SToomas Soome# 43*719d1761SToomas SoomePAGER="/usr/bin/less -ins" 44*719d1761SToomas Soomeexport PAGER 45*719d1761SToomas Soome 46ead1f93eSLiane Praza# Login and -su shells get /etc/profile services. 47ead1f93eSLiane Praza# -rsh is given its environment in its .profile. 48ead1f93eSLiane Praza 49ead1f93eSLiane Prazacase "$0" in 50*719d1761SToomas Soome-bash) 51*719d1761SToomas Soome # set prompt for bash 52*719d1761SToomas Soome PS1="\u@\h:\w\\$ " 53*719d1761SToomas Soome export PS1 54*719d1761SToomas Soome ;; 55*719d1761SToomas Soomeesac 56*719d1761SToomas Soome 57*719d1761SToomas Soomecase "$0" in 58ead1f93eSLiane Praza-sh | -ksh | -ksh93 | -jsh | -bash | -zsh) 59ead1f93eSLiane Praza 60ead1f93eSLiane Praza if [ ! -f .hushlogin ] 61ead1f93eSLiane Praza then 62ead1f93eSLiane Praza /usr/sbin/quota 63ead1f93eSLiane Praza # Allow the user to break the Message-Of-The-Day only. 64ead1f93eSLiane Praza trap "trap '' 2" 2 65ead1f93eSLiane Praza /bin/cat -s /etc/motd 66ead1f93eSLiane Praza trap "" 2 67ead1f93eSLiane Praza 68ead1f93eSLiane Praza /bin/mail -E 69ead1f93eSLiane Praza case $? in 70ead1f93eSLiane Praza 0) 71ead1f93eSLiane Praza echo "You have new mail." 72ead1f93eSLiane Praza ;; 73ead1f93eSLiane Praza 2) 74ead1f93eSLiane Praza echo "You have mail." 75ead1f93eSLiane Praza ;; 76ead1f93eSLiane Praza esac 77ead1f93eSLiane Praza fi 78ead1f93eSLiane Prazaesac 79ead1f93eSLiane Praza 80ead1f93eSLiane Prazaumask 022 81ead1f93eSLiane Prazatrap 2 3 82