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 40ead1f93eSLiane Praza# Login and -su shells get /etc/profile services. 41ead1f93eSLiane Praza# -rsh is given its environment in its .profile. 42ead1f93eSLiane Praza 43ead1f93eSLiane Prazacase "$0" in 44*719d1761SToomas Soome-bash) 45*719d1761SToomas Soome # set prompt for bash 46*719d1761SToomas Soome PS1="\u@\h:\w\\$ " 47*719d1761SToomas Soome export PS1 48*719d1761SToomas Soome ;; 49*719d1761SToomas Soomeesac 50*719d1761SToomas Soome 51*719d1761SToomas Soomecase "$0" in 52ead1f93eSLiane Praza-sh | -ksh | -ksh93 | -jsh | -bash | -zsh) 53ead1f93eSLiane Praza 54ead1f93eSLiane Praza if [ ! -f .hushlogin ] 55ead1f93eSLiane Praza then 56ead1f93eSLiane Praza /usr/sbin/quota 57ead1f93eSLiane Praza # Allow the user to break the Message-Of-The-Day only. 58ead1f93eSLiane Praza trap "trap '' 2" 2 59ead1f93eSLiane Praza /bin/cat -s /etc/motd 60ead1f93eSLiane Praza trap "" 2 61ead1f93eSLiane Praza 62ead1f93eSLiane Praza /bin/mail -E 63ead1f93eSLiane Praza case $? in 64ead1f93eSLiane Praza 0) 65ead1f93eSLiane Praza echo "You have new mail." 66ead1f93eSLiane Praza ;; 67ead1f93eSLiane Praza 2) 68ead1f93eSLiane Praza echo "You have mail." 69ead1f93eSLiane Praza ;; 70ead1f93eSLiane Praza esac 71ead1f93eSLiane Praza fi 72ead1f93eSLiane Prazaesac 73ead1f93eSLiane Praza 74ead1f93eSLiane Prazaumask 022 75ead1f93eSLiane Prazatrap 2 3 76