[packages/rc-scripts/multiple-pids-in-pidfile] support multiple pids in pidfile with start-stop-daemon
glen
glen at pld-linux.org
Fri Sep 7 16:11:25 CEST 2018
commit b1b97c1d9d38c8158474e777f0bc07274bcf310d
Author: Elan Ruusamäe <glen at pld-linux.org>
Date: Fri Sep 7 17:10:51 2018 +0300
support multiple pids in pidfile with start-stop-daemon
95229.patch | 28 ++++++++++++++++++++++++++++
rc-scripts.spec | 4 +++-
2 files changed, 31 insertions(+), 1 deletion(-)
---
diff --git a/rc-scripts.spec b/rc-scripts.spec
index 405c0e0..ce081ff 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.17
-Release: 1
+Release: 1.1
License: GPL v2
Group: Base
#Source0: ftp://distfiles.pld-linux.org/src/%{name}-%{version}.tar.gz
@@ -20,6 +20,7 @@ Source0: %{name}-%{version}.tar.gz
Source1: rc-local.service
Source2: sys-chroots.service
Source3: %{name}.tmpfiles
+Patch0: 95229.patch
URL: http://svn.pld-linux.org/trac/svn/wiki/packages/rc-scripts
BuildRequires: autoconf
BuildRequires: automake
@@ -137,6 +138,7 @@ po cichu ignorowane.
%prep
%setup -q
+%patch0 -p3 -d lib
# 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/95229.patch b/95229.patch
new file mode 100644
index 0000000..4945bca
--- /dev/null
+++ b/95229.patch
@@ -0,0 +1,28 @@
+--- /etc/init.d/functions~ 2018-09-07 16:57:25.000000000 +0300
++++ /etc/init.d/functions 2018-09-07 17:02:41.443552246 +0300
+@@ -884,12 +883,19 @@
+ # 3. kill with KILL, wait $waitretry
+ retry="--retry ${sig#-}/${delay}/${sig#-}/${waittime}/KILL/${waitretry}"
+ fi
+- /sbin/start-stop-daemon -q --stop \
+- $retry \
+- ${waitname:+--name $waitname} \
+- -s ${sig#-} \
+- ${pidfile:+--pidfile $pidfile}
+- result=$?
++
++ # expand if pidfile has multiple pids
++ result=0
++ local pid
++
++ for pid in $(cat $pidfile); do
++ /sbin/start-stop-daemon -q --stop \
++ $retry \
++ ${waitname:+--name $waitname} \
++ -s ${sig#-} \
++ --pid $pid || result=$?
++ done
++
+ if [ "$result" -eq 0 ]; then
+ ok
+ else
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/rc-scripts.git/commitdiff/b1b97c1d9d38c8158474e777f0bc07274bcf310d
More information about the pld-cvs-commit
mailing list