#	ATT:#ident	"initpkg:init.d/sysetup	1.3"	
	
#	ATT:ident "initpkg/init.d:	1.1

#ident	"@(#)initpkg/init.d:sysetup	25.1"

#   This file contains setup requirements for the system.
  
set `who -r`
if [ $9 != "S" ]
then
	exit
fi

#   The ps_data file is always removed so that the ps command will
#   be forced to read /syst, since it may have recently been created.

rm -f /etc/ps_data
echo Recreating /etc/ps_data
/bin/ps >/dev/null 2>&1

# run expreserve for vi
/usr/lib/expreserve -

# write out special header record
/bin/su - sys -c "/usr/lib/sa/sadc /usr/adm/sa/sa`date +%d`"

if [ -s /usr/adm/sulog ]
then
	mv /usr/adm/sulog /usr/adm/OLDsulog
fi

#   if the prtconf command exists, then, the system configuration
#   is printed

if [ -x /etc/prtconf ]
then
	/etc/prtconf
fi

#  If there are trademark files, print them.

if [ -d /etc/tm ]
then
	cat /etc/tm/* 2> /dev/null
fi

# Login may now log bad logins in /usr/adm/loginlog.  /bin/login is not
# setuid root so we must create the file during boot.  By default append.
if [ ! -f /usr/adm/loginlog ]
then
	> /usr/adm/loginlog
	chmod 644 /usr/adm/loginlog
	chown bin /usr/adm/loginlog
	chgrp bin /usr/adm/loginlog
# Uncomment if you want to clear out this file on boot
# else
#	> /usr/adm/loginlog
fi
