[nagios/el6] Init script overwrites pid file unnecessarily (#983129)

Jose Pedro Oliveira jpo at fedoraproject.org
Thu Aug 29 02:58:43 UTC 2013


commit 2dcaf0313685b126a986a94c0a43d40471fe92c5
Author: Jose Pedro Oliveira <jpo at di.uminho.pt>
Date:   Thu Aug 29 03:58:05 2013 +0100

    Init script overwrites pid file unnecessarily (#983129)

 nagios-0001-from-rpm.patch           |   26 ++++----------------------
 nagios-0002-SELinux-relabeling.patch |   25 +++++--------------------
 nagios.spec                          |    1 +
 3 files changed, 10 insertions(+), 42 deletions(-)
---
diff --git a/nagios-0001-from-rpm.patch b/nagios-0001-from-rpm.patch
index 46c8d75..ad9fe44 100644
--- a/nagios-0001-from-rpm.patch
+++ b/nagios-0001-from-rpm.patch
@@ -1,17 +1,7 @@
-From a31fd52099234e6d9e580f0fcd22774ca2709a65 Mon Sep 17 00:00:00 2001
-From: Mike McGrath <mmcgrath at redhat.com>
-Date: Thu, 25 Feb 2010 14:21:30 +0300
-Subject: [PATCH 01/11] from rpm
-
----
- daemon-init.in |    4 +++-
- 1 files changed, 3 insertions(+), 1 deletions(-)
-
-diff --git a/daemon-init.in b/daemon-init.in
-index cdb9b93..f2feb9d 100644
---- a/daemon-init.in
-+++ b/daemon-init.in
-@@ -124,11 +124,13 @@ case "$1" in
+diff -ruN nagios/daemon-init.in nagios-modified/daemon-init.in
+--- nagios/daemon-init.in	2010-10-23 10:59:18.000000000 +0100
++++ nagios-modified/daemon-init.in	2013-08-29 03:19:07.501259965 +0100
+@@ -129,7 +129,8 @@
  		echo -n "Starting nagios:"
  		$NagiosBin -v $NagiosCfgFile > /dev/null 2>&1;
  		if [ $? -eq 0 ]; then
@@ -21,11 +11,3 @@ index cdb9b93..f2feb9d 100644
  			rm -f $NagiosCommandFile
  			touch $NagiosRunFile
  			chown $NagiosUser:$NagiosGroup $NagiosRunFile
- 			$NagiosBin -d $NagiosCfgFile
-+                        pidof nagios > $NagiosRunFile
- 			if [ -d $NagiosLockDir ]; then touch $NagiosLockDir/$NagiosLockFile; fi
- 			echo " done."
- 			exit 0
--- 
-1.7.3.5
-
diff --git a/nagios-0002-SELinux-relabeling.patch b/nagios-0002-SELinux-relabeling.patch
index 2658305..1fa4dd7 100644
--- a/nagios-0002-SELinux-relabeling.patch
+++ b/nagios-0002-SELinux-relabeling.patch
@@ -1,26 +1,11 @@
-From 1dc8b5f6b306e24a66c5e999f7bface07fd2158f Mon Sep 17 00:00:00 2001
-From: Daniel Walsh <dwalsh at redhat.com>
-Date: Thu, 25 Feb 2010 14:24:00 +0300
-Subject: [PATCH 02/11] SELinux relabeling
-
-This patch adds a restorecon call to the init script to label the pid file
-correctly.
----
- daemon-init.in |    1 +
- 1 files changed, 1 insertions(+), 0 deletions(-)
-
-diff --git a/daemon-init.in b/daemon-init.in
-index f2feb9d..75aa0b3 100644
---- a/daemon-init.in
-+++ b/daemon-init.in
-@@ -129,6 +129,7 @@ case "$1" in
+diff -ruN nagios/daemon-init.in nagios-modified/daemon-init.in
+--- nagios/daemon-init.in	2013-08-29 03:19:07.501259965 +0100
++++ nagios-modified/daemon-init.in	2013-08-29 03:20:36.733259743 +0100
+@@ -134,6 +134,7 @@
  			rm -f $NagiosCommandFile
  			touch $NagiosRunFile
  			chown $NagiosUser:$NagiosGroup $NagiosRunFile
 +			[ -x /sbin/restorecon ] && /sbin/restorecon $NagiosRunFile
  			$NagiosBin -d $NagiosCfgFile
-                         pidof nagios > $NagiosRunFile
  			if [ -d $NagiosLockDir ]; then touch $NagiosLockDir/$NagiosLockFile; fi
--- 
-1.7.3.5
-
+ 			echo " done."
diff --git a/nagios.spec b/nagios.spec
index 8f80c46..f94fcdb 100644
--- a/nagios.spec
+++ b/nagios.spec
@@ -282,6 +282,7 @@ fi
 %changelog
 * Thu Aug 29 2013 Jose Pedro Oliveira <jpo at di.uminho.pt> - 3.5.0-2
 - Insecure temporary file usage in nagios.upgrade_to_v3.sh (#958294)
+- Init script overwrites pid file unnecessarily (#983129)
 - Corrected bogus dates
 
 * Thu Apr 25 2013 Jose Pedro Oliveira <jpo at di.uminho.pt> - 3.5.0-1


More information about the scm-commits mailing list