From 21d8eeef1cf15d13b077faf7aca2429689699b21 Mon Sep 17 00:00:00 2001 From: Victor Hu Date: Thu, 1 Oct 2015 16:35:16 -0400 Subject: [PATCH 1/2] The file is syslogd.pid on older systems, causing the error 'File not found' --- xCAT/debian/postinst | 6 +++++- xCAT/xCAT.spec | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/xCAT/debian/postinst b/xCAT/debian/postinst index 8165446f4..8caf43b58 100644 --- a/xCAT/debian/postinst +++ b/xCAT/debian/postinst @@ -46,7 +46,11 @@ case "$1" in /etc/init.d/apache2 restart - kill -HUP $(/dev/null 2>&1 || : + 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..16d2e4595 100644 --- a/xCAT/xCAT.spec +++ b/xCAT/xCAT.spec @@ -202,7 +202,11 @@ then fi # Lets rsyslogd perform close all open files -kill -HUP $(/dev/null 2>&1 || : +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 From 8fe3ce628fe4caa8ad57dbeeb5be3bc55ad94050 Mon Sep 17 00:00:00 2001 From: Victor Hu Date: Tue, 13 Oct 2015 07:54:59 -0400 Subject: [PATCH 2/2] Added the check for rsyslog and to kill that process to xCATsn --- xCAT/debian/postinst | 1 + xCAT/xCAT.spec | 2 +- xCATsn/xCATsn.spec | 7 +++++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/xCAT/debian/postinst b/xCAT/debian/postinst index 8caf43b58..998d9d844 100644 --- a/xCAT/debian/postinst +++ b/xCAT/debian/postinst @@ -46,6 +46,7 @@ case "$1" in /etc/init.d/apache2 restart + # 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 diff --git a/xCAT/xCAT.spec b/xCAT/xCAT.spec index 16d2e4595..fa2b7277e 100644 --- a/xCAT/xCAT.spec +++ b/xCAT/xCAT.spec @@ -201,7 +201,7 @@ then cp /etc/xcat/conf.orig/xcat.conf.apach24 /etc/apache2/conf.d/xcat.conf fi -# Lets rsyslogd perform close all open files +# 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 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