From 1d509ca479eb92598af2f9c37a4632fb2bfb5d2c Mon Sep 17 00:00:00 2001 From: lissav Date: Tue, 26 Feb 2008 18:27:55 +0000 Subject: [PATCH] Fix adding multiple entries to syslog.conf git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@582 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT/xCAT.spec | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/xCAT/xCAT.spec b/xCAT/xCAT.spec index c37ae7374..41bdcfd48 100644 --- a/xCAT/xCAT.spec +++ b/xCAT/xCAT.spec @@ -145,14 +145,16 @@ if [ "$1" = "1" ]; then #Only if installing for the fist time.. rm /tftpboot/pxelinux.cfg/default # setup syslog - cp /etc/syslog.conf /etc/syslog.conf.ORIG - echo "*.debug /var/log/localmessages" > /etc/test.tmp - echo "*.crit /var/log/localmessages" >> /etc/test.tmp + if [ ! -r /etc/syslog.conf.XCATORIG ]; then + cp /etc/syslog.conf /etc/syslog.conf.XCATORIG + echo "*.debug /var/log/messages" > /etc/test.tmp + echo "*.crit /var/log/messages" >> /etc/test.tmp cat /etc/test.tmp >> /etc/syslog.conf rm /etc/test.tmp - touch /var/log/localmessages + touch /var/log/messages /etc/rc.d/init.d/syslog stop /etc/rc.d/init.d/syslog start + fi XCATROOT=$RPM_INSTALL_PREFIX0 /etc/init.d/xcatd start if [ -x $RPM_INSTALL_PREFIX0/sbin/mknb ]; then