diff --git a/xCAT/debian/postinst b/xCAT/debian/postinst index 8165446f4..998d9d844 100644 --- a/xCAT/debian/postinst +++ b/xCAT/debian/postinst @@ -46,7 +46,12 @@ case "$1" in /etc/init.d/apache2 restart - kill -HUP $(/dev/null 2>&1 || : + # Let rsyslogd perform close of any open files + if [ -e /var/run/rsyslogd.pid ]; then + kill -HUP $(/dev/null 2>&1 || : + elif [ -e /var/run/syslogd.pid ]; then + kill -HUP $(/dev/null 2>&1 || : + fi ;; abort-upgrade|abort-remove|abort-deconfigure) diff --git a/xCAT/xCAT.spec b/xCAT/xCAT.spec index 4ebbb4033..fa2b7277e 100644 --- a/xCAT/xCAT.spec +++ b/xCAT/xCAT.spec @@ -201,8 +201,12 @@ then cp /etc/xcat/conf.orig/xcat.conf.apach24 /etc/apache2/conf.d/xcat.conf fi -# Lets rsyslogd perform close all open files -kill -HUP $(/dev/null 2>&1 || : +# Let rsyslogd perform close of any open files +if [ -e /var/run/rsyslogd.pid ]; then + kill -HUP $(/dev/null 2>&1 || : +elif [ -e /var/run/syslogd.pid ]; then + kill -HUP $(/dev/null 2>&1 || : +fi %endif # create dir for the current pid diff --git a/xCATsn/xCATsn.spec b/xCATsn/xCATsn.spec index e617c3012..6bc371324 100644 --- a/xCATsn/xCATsn.spec +++ b/xCATsn/xCATsn.spec @@ -156,6 +156,13 @@ if [ -n "$version" ]; then fi +# Let rsyslogd perform close of any open files +if [ -e /var/run/rsyslogd.pid ]; then + kill -HUP $(/dev/null 2>&1 || : +elif [ -e /var/run/syslogd.pid ]; then + kill -HUP $(/dev/null 2>&1 || : +fi + %endif # create dir for the current pid and move the original ones from /tmp/xcat to /var/run/xcat