From e1da3e412412fe2d4dce85d740f8697dbd03c30c Mon Sep 17 00:00:00 2001
From: xq2005 <xq2005@8638fb3e-16cb-4fca-ae20-7b5d299a9bcd>
Date: Mon, 7 Jan 2013 07:35:23 +0000
Subject: [PATCH] rsyslog support on debian

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14773 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
---
 xCAT/postscripts/syslog | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/xCAT/postscripts/syslog b/xCAT/postscripts/syslog
index 162fda89d..7a2daabe4 100755
--- a/xCAT/postscripts/syslog
+++ b/xCAT/postscripts/syslog
@@ -116,13 +116,13 @@ if [ $NTYPE = service ]; then
 fi
 
 if [ "$(uname -s)" = "Linux" ]; then
-  if ( pmatch $OSVER "fedora*" ) || ( pmatch $OSVER "rhels5*" ) || ( pmatch $OSVER "rhel6*" ) || ( pmatch $OSVER "rhels6*" ) || [ -f /etc/fedora-release ] || [ -f /etc/redhat-release ] || ( pmatch $OSVER "ubuntu*" ) || ( is_lsb_ubuntu ); then
+  if ( pmatch $OSVER "fedora*" ) || ( pmatch $OSVER "rhels5*" ) || ( pmatch $OSVER "rhel6*" ) || ( pmatch $OSVER "rhels6*" ) || [ -f /etc/fedora-release ] || [ -f /etc/redhat-release ] || ( pmatch $OSVER "ubuntu*" ) || ( is_lsb_ubuntu ) || ( pmatch $OSVER "debian*" ); then
     if [ -e /etc/rsyslog.conf ]; then
       conf_file="/etc/rsyslog.conf"
       sysconfig="/etc/sysconfig/rsyslog"
       init="/etc/init.d/rsyslog"
       isRsyslog=1
-      if ( pmatch $OSVER "ubuntu*" ) || ( is_lsb_ubuntu ); then
+      if ( pmatch $OSVER "ubuntu*" ) || ( is_lsb_ubuntu ) || ( pmatch $OSVER "debian*" ); then
         sysconfig="/etc/default/rsyslog"
       fi
     fi
@@ -241,7 +241,7 @@ else
     
     #Ubuntu doesn't have sysconfig 
     # so configuring the MN to receive UDP connections here.
-    if ( pmatch $OSVER "ubuntu*" ) || ( is_lsb_ubuntu ); then
+    if ( pmatch $OSVER "ubuntu*" ) || ( is_lsb_ubuntu ) || ( pmatch $OSVER "debian*" ); then
       egrep \('^\$UDPServerRun 514'\|'^\$ModLoad imudp'\) $conf_file > /dev/null 2>&1;
       if [ $? -eq 1 ]; then
         echo "\$ModLoad imudp" >> $conf_file;
@@ -278,7 +278,7 @@ else
       if [ $isLinux -eq 0 ]; then
         echo "*.debug @$master" >> $conf_file
       else
-        if ( pmatch $OSVER "ubuntu*" ) || ( is_lsb_ubuntu ); then
+        if ( pmatch $OSVER "ubuntu*" ) || ( is_lsb_ubuntu ) || ( pmatch $OSVER "debian*" ); then
           echo "\$ModLoad imuxsock" >> $conf_file
           echo "*.* @$master" >> $conf_file
         else