: # @(#) profile 68.1 98/01/20 # # Copyright (C) 1990-1998 The Santa Cruz Operation, Inc. # All Rights Reserved. # The information in this file is provided for the exclusive use of # the licensees of The Santa Cruz Operation, Inc. Such users have the # right to use, modify, and incorporate this code into other products # for purposes authorized by the license agreement provided they include # this notice and the associated copyright notice with any such product. # The information in this file is provided "AS IS" without warranty. # # .profile -- Commands executed by a login Korn shell # yesno() { while : do read answer case $answer in y|y*|Y|Y*) cont=1 break;; n|n*|N|N*) cont=0 break;; *) echo "Enter y or n \c" continue;; esac done } PATH=$PATH:$HOME/bin:. # set command search path export PATH if [ -z "$LOGNAME" ]; then LOGNAME=`logname` # name of user who logged in export LOGNAME fi MAIL=/usr/spool/mail/$LOGNAME # mailbox location export MAIL if [ -z "$PWD" ]; then PWD=$HOME # assumes initial cwd is HOME export PWD fi if [ -f $HOME/.kshrc -a -r $HOME/.kshrc ]; then ENV=$HOME/.kshrc # set ENV if there is an rc file export ENV fi # If job control is enabled, set the suspend character to ^Z (control-z): case $- in *m*) stty susp '^z' ;; esac set -o ignoreeof # don't let control-d logout case $LOGNAME in # include command number in prompt root) PS1="!# " ;; *) PS1="!$ " ;; esac export PS1 /usr/bin/prwarn # issue a warning if password due to expire clear echo "\n* * * * * Shutdown * * * *" echo "\nDo you wish to continue? (y/n): \c" yesno case $cont in 1) # yes ;; 0) # no exit 0;; esac # enable the following to shutdown without delay or confirmation: # /tcb/bin/asroot shutdown -y -g0 # enable the following to shutdown with a 60 second delay without confirmation /tcb/bin/asroot shutdown -y -g1 # enable the following to shutdown with a 60 second delay with confirmation # /tcb/bin/asroot shutdown exit 0