]> git.pld-linux.org Git - packages/rc-scripts.git/commitdiff
support multiple pids in pidfile with start-stop-daemon
authorElan Ruusamäe <glen@pld-linux.org>
Fri, 7 Sep 2018 14:10:51 +0000 (17:10 +0300)
committerElan Ruusamäe <glen@pld-linux.org>
Mon, 31 Dec 2018 10:47:42 +0000 (12:47 +0200)
95229.patch [new file with mode: 0644]
rc-scripts.spec

diff --git a/95229.patch b/95229.patch
new file mode 100644 (file)
index 0000000..4945bca
--- /dev/null
@@ -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
index 405c0e00f3de8ab46917660457e0d39b6e781d27..138914699255729e6d3cdc63cd3a8a7912a7487f 100644 (file)
@@ -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"
This page took 0.118828 seconds and 4 git commands to generate.