This is an old revision of the document!
[gX:~] # cat syslog.conf ... local7.info /var/log/dhcpd.log ... [gX:~] # touch /var/log/dhcpd.log [gX:~] # /etc/rc.d/syslogd reload [gX:~] # logger -t dhcpd -p local7.info "Starting dhcpd..."
[gX:~] # cat /etc/newsyslog.conf ... /var/log/dhcpd.log 600 7 10 * J [gX:~] # cat logger.sh logger -t dhcpd -p local7.info "Message 1" logger -t dhcpd -p local7.info "Message 2" [gX:~] # sh logger.sh ... <Ctrl>-C [gX:~] # tail -f /var/log/dhcpd.log ... <Ctrl>-C [gX:~] # newsyslog [gX:~] # ls -l /var/log/dhcpd*
[gX:~] # cat /etc/rc.conf ... syslogd_flags="-a 192.168.X.0/24"
Сокращенная форма 192.168.X/24 не распознается!
[gX:~] # /etc/rc.d/syslogd restart
[g50:~] # cat /etc/syslog.conf *.* @gX ... [g50:~] # /etc/rc.d/syslogd restart
[gX:~] # cat syslog.sh #!/bin/sh while read m do if expr "$m" : '.*login.*' > /dev/null then echo $m | mail -s login root fi done [gX:~] # chmod +x syslog.sh [gX:~] # cat /etc/syslog.conf ... auth.* | /root/syslog.sh ...