#! /bin/sh
#
# |-----------------------------------------------------------|
# | Copyright (c) 1991, 1990 MIPS Computer Systems, Inc.      |
# | All Rights Reserved                                       |
# |-----------------------------------------------------------|
# |          Restricted Rights Legend                         |
# | Use, duplication, or disclosure by the Government is      |
# | subject to restrictions as set forth in                   |
# | subparagraph (c)(1)(ii) of the Rights in Technical        |
# | Data and Computer Software Clause of DFARS 252.227-7013.  |
# |         MIPS Computer Systems, Inc.                       |
# |         950 DeGuigne Avenue                               |
# |         Sunnyvale, California 94088-3650, USA             |
# |-----------------------------------------------------------|
#
# $Header: syslog,v 1.6.2.1 92/06/24 13:35:06 marker Exp $

#  Start the syslog-daemon

if [ -x /usr/etc/syslogd ]
then
	date '+/etc/rc starting syslogd at %D, %T' >> /usr/adm/SYSLOG
	chmod 644 /usr/adm/SYSLOG
#make sure the log files exist
	logfiles=`sed -n '
	   /^#/d
	   /^$/d
	   /\?\/dev/d
	  s/[^ 	]*[ 	]*\(\/.*\)/\1/p' < /etc/syslog.conf`
	
	for file in ${logfiles}
	{
	    if [ -f $file ]
	    then
		true
	    else
		cp /dev/null $file
		chmod 644 $file
	    fi
	}
	rm -f /etc/syslog.pid
	/usr/etc/syslogd
else
	rm -f /dev/syslog
fi
exit 0
