[packages/rc-scripts] apply 27a3470.patch: Don't delete base pidfile if other pid file was specified.

glen glen at pld-linux.org
Sat Feb 9 15:20:21 CET 2019


commit dfc7564b38c50f5eb1b6d825c9db785227916836
Author: Elan Ruusamäe <glen at pld-linux.org>
Date:   Fri Feb 8 16:25:46 2019 +0200

    apply 27a3470.patch: Don't delete base pidfile if other pid file was specified.

 27a3470.patch   | 31 +++++++++++++++++++++++++++++++
 rc-scripts.spec |  6 ++++--
 2 files changed, 35 insertions(+), 2 deletions(-)
---
diff --git a/rc-scripts.spec b/rc-scripts.spec
index fc86283..b049799 100644
--- a/rc-scripts.spec
+++ b/rc-scripts.spec
@@ -11,7 +11,7 @@ Summary(pl.UTF-8):	inittab i skrypty startowe z katalogu /etc/rc.d
 Summary(tr.UTF-8):	inittab ve /etc/rc.d dosyaları
 Name:		rc-scripts
 Version:	0.4.18
-Release:	2
+Release:	3
 License:	GPL v2
 Group:		Base
 #Source0:	ftp://distfiles.pld-linux.org/src/%{name}-%{version}.tar.gz
@@ -20,7 +20,8 @@ Source0:	%{name}-%{version}.tar.gz
 Source1:	rc-local.service
 Source2:	sys-chroots.service
 Source3:	%{name}.tmpfiles
-Patch0:	95229.patch
+Patch0:		95229.patch
+Patch1:		27a3470.patch
 URL:		http://svn.pld-linux.org/trac/svn/wiki/packages/rc-scripts
 BuildRequires:	autoconf
 BuildRequires:	automake
@@ -139,6 +140,7 @@ po cichu ignorowane.
 %prep
 %setup -q
 %patch0 -p3 -d lib
+%patch1 -p1
 
 # hack, currently this results in errno@@GLIBC_PRIVATE symbol in ppp-watch:
 #GLIB_LIBS="-Wl,-static `$PKG_CONFIG --libs --static glib-2.0` -Wl,-Bdynamic"
diff --git a/27a3470.patch b/27a3470.patch
new file mode 100644
index 0000000..ca7b379
--- /dev/null
+++ b/27a3470.patch
@@ -0,0 +1,31 @@
+From 27a3470a3eca2ab9b6d5ac5b7b8c7fdb65b66435 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= <arekm at maven.pl>
+Date: Wed, 6 Feb 2019 15:45:43 +0100
+Subject: [PATCH] Don't delete base pidfile if other pid file was specified.
+ Delete it instead. It was deleting aaa.pid even if we did killproc -p bbb.pid
+ aaa and our service name was aaa.
+
+---
+ lib/functions | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/lib/functions b/lib/functions
+index 9716981..b696738 100644
+--- a/lib/functions
++++ b/lib/functions
+@@ -976,7 +976,11 @@ killproc() {
+ 
+ 	# Remove pid file if any.
+ 	if [ "$notset" = "1" ]; then
+-		rm -f /var/run/${base}.pid
++		if [ -f "${pidfile}" ] ; then
++			rm -f "$pidfile"
++		else
++			rm -f /var/run/${base}.pid
++		fi
+ 	fi
+ 
+ 	return $result
+-- 
+2.20.1
+
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rc-scripts.git/commitdiff/dfc7564b38c50f5eb1b6d825c9db785227916836



More information about the pld-cvs-commit mailing list