From 5006b9db5f02be503415c0f46dffcc487a5aa95e Mon Sep 17 00:00:00 2001 From: arifali Date: Mon, 16 Apr 2012 19:40:18 +0000 Subject: [PATCH] fix rsyslog for ubuntu on MN, and don't need to do it in posinst git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12247 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/debian/postinst | 4 ---- xCAT/postscripts/syslog | 5 ++++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/xCAT-server/debian/postinst b/xCAT-server/debian/postinst index e293471be..1c14637a0 100644 --- a/xCAT-server/debian/postinst +++ b/xCAT-server/debian/postinst @@ -21,10 +21,6 @@ set -e case "$1" in configure) . /etc/profile.d/xcat.sh - if [ ! `grep -i imuxsock /etc/rsyslog.conf` ] ; then - echo \$ModLoad imuxsock >> /etc/rsyslog.conf - service rsyslog restart - fi xcatconfig -i -d update-rc.d xcatd enable if [ -f /tmp/xCAT-server_upgrade.tmp ]; then diff --git a/xCAT/postscripts/syslog b/xCAT/postscripts/syslog index 6eb91f89a..009427943 100755 --- a/xCAT/postscripts/syslog +++ b/xCAT/postscripts/syslog @@ -87,7 +87,7 @@ config_Rsyslog_C3() echo "# xCAT settings" >> $2 #enable to receive remote logging if [ $isReceiving -eq 1 ]; then - sed 's/^\#\(\s\)*\$ModLoad\(\s\)*imudp.so/\$ModLoad imudp.so/' $2 >/tmp/sed.tmp + sed 's/^\#\(\s\)*\$ModLoad\(\s\)*imudp/\$ModLoad imudp/' $2 >/tmp/sed.tmp cat /tmp/sed.tmp >$2 sed 's/^\#\(\s\)*\$UDPServerRun/\$UDPServerRun/' $2 >/tmp/sed.tmp cat /tmp/sed.tmp >$2 @@ -118,6 +118,9 @@ if [ "$(uname -s)" = "Linux" ]; then sysconfig="/etc/sysconfig/rsyslog" init="/etc/init.d/rsyslog" isRsyslog=1 + if ( pmatch $OSVER "ubuntu*" ) || ( is_lsb_ubuntu ); then + sysconfig="/etc/default/rsyslog" + fi fi else if ( pmatch $OSVER "sles*" ) || ( pmatch $OSVER "suse*" ) || [ -f /etc/SuSE-release ]; then