#!/sbin/sh
# $Revision: 1.1.2.8 $

runlevel=`/usr/bin/who -r | awk '{print $3}'`

if [ $runlevel -lt 3 ]; then
    exec /sbin/sh "$@"
else

    echo
    /usr/bin/banner Warning!
    /usr/bin/cat <<EOF

This machine is a StorEdge N8000 series Filer.  It is not a standard
Solaris server or workstation.  Unless specifically instructed to do
so, you should never log into this machine as root.  Unsolicited
modifications made as the "root" user can cause the Filer software to
malfunction.  You should use the "admin" user login and the GUI.

EOF

    DONE=0
    until [ $DONE = 1 ]; do
	/usr/bin/printf "Do you still want to log in as root?(y/n) "
	read answer
	    if [ $answer = "y" ] || [ $answer = "Y" ]; then
	    DONE=1
	    /usr/bin/cat /etc/motd
	    exec /sbin/sh "$@"
	elif [ $answer = "n" ] || [ $answer = "N" ]; then
	    DONE=1
	    exit 1
	fi
    done
fi
