From e4e977649f2a9d62977a7b422a7041f335600b95 Mon Sep 17 00:00:00 2001 From: otubo Date: Wed, 28 Sep 2011 19:14:42 +0000 Subject: [PATCH] Adding support for Ubuntu on syslog script git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10665 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT/postscripts/syslog | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/xCAT/postscripts/syslog b/xCAT/postscripts/syslog index 9394027e3..dc903ff9f 100755 --- a/xCAT/postscripts/syslog +++ b/xCAT/postscripts/syslog @@ -204,6 +204,16 @@ else echo "*.debug /var/log/messages rotate 1024K files 5" >> $conf_file fi fi + + #Ubuntu doesn't have sysconfig + # so configuring the MN to receive UDP connections here. + if ( pmatch $OSVER "ubuntu*" ); then + egrep \('^\$UDPServerRun 514'\|'^\$ModLoad imudp'\) $conf_file > /dev/null 2>&1; + if [ $? -eq 1 ]; then + echo "\$ModLoad imudp" >> $conf_file; + echo "\$UDPServerRun 514" >> $conf_file; + fi + fi else #now make the syslogd fowarding the messages to the the master if [ $ng -eq 1 ]; then @@ -228,7 +238,12 @@ else if [ $isLinux -eq 0 ]; then echo "*.debug @$master" >> $conf_file else - echo "*.* @$master" >> $conf_file + if ( pmatch $OSVER "ubuntu*" ); then + echo "\$ModLoad imuxsock" >> $conf_file + echo "*.* @$master" >> $conf_file + else + echo "*.* @$master" >> $conf_file + fi fi fi fi