Собственно имеется скрипт syslog-ng адаптированный под мои нужды, но его часть
if [! cat /etc/rc.d/rc.M | grep 'next generation system logger']; then
echo "# Start the next generation system logger." >> /etc/rc.d/rc.M
echo "if [ -x /etc/rc.d/rc.syslog-ng ]; then" >> /etc/rc.d/rc.M
echo " . /etc/rc.d/rc.syslog-ng start " >> /etc/rc.d/rc.M
echo "fi" >> /etc/rc.d/rc.M
fiнаотрез отказывается работать и выдает следующее сообщение
Configuration file has no version number, assuming syslog-ng 2.1 format. Please add @version: maj.min to the beginning of the file;
WARNING: global: the default value of chain_hostnames is changing to 'no' in version 3.0, please update your configuration accordingly;
Your configuration file uses an obsoleted keyword, please update your configuration; keyword='sync', change='flush_lines'
WARNING: input: sources do not remove new-line characters from messages by default in version 3.0, please add 'no-multi -line' flag to your configuration if you want to retain this functionality;
WARNING: template: the default value for template-escape is changing to 'no' in version 3.0, please update your configuration file accordingly;
собственно сам скрипт
#! /bin/sh
# Install some packages
installpkg ./eventlog-0.2.7-i486-1gufo.tgz
installpkg ./syslog-ng-3.0.2-i486-1gufo.tgz
# Getting IP on eth0
IP=`ifconfig | grep 'inet ' | cut -f 2 -d ":" | cut -f 1 -d " " |grep '' -m 1`;
# Generating /etc/syslog-ng/syslog-ng.conf
echo "options { long_hostnames(off); sync(0); };" > /etc/syslog-ng/syslog-ng.conf
echo '''
source src { unix-stream("/dev/log"); internal(); };
source from_all { udp (ip('''$IP''') port(514)); };
destination to_all { file ( "/var/log/HOSTS/$HOST/$HOST.log" perm(0666) dir_perm(0755) create_dirs(yes) ); };
destination authlog { file("/var/log/auth.log"); };
destination cron { file("/var/log/cron.log"); };
destination daemon { file("/var/log/daemon.log"); };
destination kern { file("/var/log/kern.log"); };
destination lpr { file("/var/log/lpr.log"); };
destination user { file("/var/log/user.log"); };
destination uucp { file("/var/log/uucp.log"); };
destination ppp { file("/var/log/ppp.log"); };
destination debug { file("/var/log/debug"); };
destination messages { file("/var/log/messages"); };
destination console { usertty("root"); };
destination console_all { file("/dev/tty12"); };
#destination loghost { udp("loghost" port(999)); };
destination xconsole { pipe("/dev/xconsole"); };
filter f_auth { facility(auth); };
filter f_authpriv { facility(auth, authpriv); };
filter f_syslog { not facility(authpriv, mail); };
filter f_cron { facility(cron); };
filter f_daemon { facility(daemon); };
filter f_kern { facility(kern); };
filter f_lpr { facility(lpr); };
filter f_user { facility(user); };
filter f_uucp { facility(cron); };
filter f_ppp { facility(local2); };
filter f_news { facility(news); };
filter f_debug { not facility(auth, authpriv); };
filter f_messages { level(info..warn)
and not facility(auth, authpriv); };
filter f_emergency { level(emerg); };
filter f_info { level(info); };
filter f_notice { level(notice); };
filter f_warn { level(warn); };
filter f_crit { level(crit); };
filter f_err { level(err); };
log { source(from_all); destination(to_all); };
log { source(src); filter(f_authpriv); destination(authlog); };
log { source(src); filter(f_cron); destination(cron); };
log { source(src); filter(f_daemon); destination(daemon); };
log { source(src); filter(f_kern); destination(kern); };
log { source(src); filter(f_lpr); destination(lpr); };
log { source(src); filter(f_user); destination(user); };
log { source(src); filter(f_uucp); destination(uucp); };
log { source(src); filter(f_debug); destination(debug); };
log { source(src); filter(f_messages); destination(messages); };
log { source(src); filter(f_emergency); destination(console); };
log { source(src); filter(f_ppp); destination(ppp); };
log { source(src); destination(console_all); };''' >> /etc/syslog-ng/syslog-ng.conf
#echo "source from_all { udp (ip(""$IP"") port(514)); };" >> /etc/syslog-ng/syslog-ng.conf
#echo 'source src { unix-stream("/dev/log"); internal(); };' >> /etc/syslog-ng/syslog-ng.conf
#echo 'destination to_all { file ( "/var/log/HOSTS/$HOST/$HOST.log" perm(0666) dir_perm(0755) create_dirs(yes) ); };' >> /etc/syslog-ng/syslog-ng.conf
#echo "log { source(from_all); destination(to_all); };" >> /etc/syslog-ng/syslog-ng.conf
cp ./rc.syslog-ng /etc/rc.d/rc.syslog-ng
chmod 755 /etc/rc.d/rc.syslog-ng
chmod 644 /etc/rc.d/rc.syslog
#cp ./rc.M /etc/rc.d/rc.M
if [! cat /etc/rc.d/rc.M | grep 'next generation system logger']; then
echo "# Start the next generation system logger." >> /etc/rc.d/rc.M
echo "if [ -x /etc/rc.d/rc.syslog-ng ]; then" >> /etc/rc.d/rc.M
echo " . /etc/rc.d/rc.syslog-ng start " >> /etc/rc.d/rc.M
echo "fi" >> /etc/rc.d/rc.M
fi
killall syslogd
killall syslog-ng
syslog-ng
#tar -zxvf ./Python-3.1.3.tgz
#cd ./Python-3.1.3
#./configure
#make
#make install
# Uncomment if U need some Python3.1

, а если быть точнее такие же как в syslog-ng.log