[packages/rc-scripts] fix daemon --fork uses, patch from pld-rc-scripts mailinglist

glen glen at pld-linux.org
Thu Dec 10 21:30:12 CET 2015


commit 3c511fa40a87a2b1cc51e2cfb714c55182fff73d
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Thu Dec 10 22:29:40 2015 +0200

    fix daemon --fork uses, patch from pld-rc-scripts mailinglist

 rc-scripts-git.patch | 23 +++++++++++++++++++++--
 rc-scripts.spec      |  2 +-
 2 files changed, 22 insertions(+), 3 deletions(-)
---
diff --git a/rc-scripts.spec b/rc-scripts.spec
index e45888a..4aac10a 100644
--- a/rc-scripts.spec
+++ b/rc-scripts.spec
@@ -9,7 +9,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.15
-Release:	2
+Release:	3
 License:	GPL v2
 Group:		Base
 #Source0:	ftp://distfiles.pld-linux.org/src/%{name}-%{version}.tar.gz
diff --git a/rc-scripts-git.patch b/rc-scripts-git.patch
index 4cab90a..4b9a2f3 100644
--- a/rc-scripts-git.patch
+++ b/rc-scripts-git.patch
@@ -1,8 +1,27 @@
 diff --git a/lib/functions b/lib/functions
-index 8d018f7..501cac9 100644
+index 8d018f7..f9538d2 100644
 --- a/lib/functions
 +++ b/lib/functions
-@@ -1009,7 +1009,7 @@ pidofproc() {
+@@ -690,13 +690,12 @@ _daemon_exec() {
+ 			--exec "$prog" \
+ 			-- "$@"
+ 	else
+-
+-		if [ "$makepid" ] && [ "$pidfile" ]; then
+-			export PIDFILE="$pidfile"
+-			set -- /lib/rc-scripts/makepid "$@"
+-		fi
+-
+ 		if [ "$fork" = "1" ]; then
++			export PIDFILE="/dev/null"
++			if [ "$makepid" ] && [ "$pidfile" ]; then
++				export PIDFILE="$pidfile"
++			fi
++			set -- /lib/rc-scripts/makepid "$@"
+ 			set -- /usr/bin/setsid "$@"
+ 		fi
+ 		if [ -n "$user" -a "$user" != "root" ]; then
+@@ -1009,7 +1008,7 @@ pidofproc() {
  	fi
  
  	# Next try "pidof" if pidfile is not specified
================================================================

---- gitweb:

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



More information about the pld-cvs-commit mailing list