#------------------------------------------------------------------------------
# /etc/rc.d/rc325.syslogd - start syslogd
# was file /etc/rc.d/syslogd
#
# Creation:     29.08.2000 fm
# Last Update:  $Id: rc325.syslogd 9281 2005-06-25 23:16:37Z jw5 $
#------------------------------------------------------------------------------

if [ "$OPT_SYSLOGD" = yes ]
then
    begin_script SYSLOGD "starting syslogd ..."

    cat <<-EOF>>/etc/services
	syslog		514/udp
EOF
    if [ ! -f /etc/syslog.conf ]                # already existing?
    then                                        # yes, don't overwrite
	[ "$SYSLOGD_DEST_N" -eq 0 ] || for idx in `seq 1 $SYSLOGD_DEST_N`
        do
            eval dest='$SYSLOGD_DEST_'$idx
            echo "$dest" >> /etc/syslog.conf
        done
    fi
    syslogd
    sleep 1

  end_script
fi
