Bug 137016 - sys-block/vblade - /etc/init.d/vblade.vblade0 script doesn't stop vblade.vblade0
Bug#: 137016 Product:  Gentoo Linux Version: 2006.0 Platform: All
OS/Version: Other Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: robbat2@gentoo.org Reported By: gentoo.bugs@pointb.co.uk
Component: Ebuilds
URL: 
Summary: sys-block/vblade - /etc/init.d/vblade.vblade0 script doesn't stop vblade.vblade0
Keywords:  
Status Whiteboard: 
Opened: 2006-06-16 13:25 0000
Description:   Opened: 2006-06-16 13:25 0000
After installing vblade-10 I have noticed that running
'/etc/init.d/vblade.vblade0 stop' doesn't stop all required processes:

with vblade.vblade0 started you get the following processes

(root@queeg:~)# ps -edf | grep vblade
root     15555     1  0 21:12 ?        00:00:00 /bin/sh /usr/sbin/vbladed 1 0
eth0 /dev/md3
root     15556 15555  0 21:12 ?        00:00:00 /usr/sbin/vblade 1 0 eth0
/dev/md3
root     15557 15555  0 21:12 ?        00:00:00 /usr/bin/logger -t
vblade.vblade0
root     15647 15634  0 21:21 pts/0    00:00:00 grep vblade

and then I stop the vblade.vblade0

(root@queeg:~)# /etc/init.d/vblade.vblade0 stop
 * Stopping vblade.vblade0 ...                                                 
                                        [ ok ]

all is reported as ok, however I still have the following vblade processes
running:

(root@queeg:~)# ps -edf | grep vblade
root     15556     1  0 21:12 ?        00:00:00 /usr/sbin/vblade 1 0 eth0
/dev/md3
root     15557     1  0 21:12 ?        00:00:00 /usr/bin/logger -t
vblade.vblade0
root     15688 15634  0 21:22 pts/0    00:00:00 grep vblade
(root@queeg:~)#

------- Comment #1 From Robin Johnson 2006-07-21 22:06:42 0000 -------
fixed in cvs.

------- Comment #2 From Robin Johnson 2006-07-21 22:07:40 0000 -------
forgot to mark resolved.

------- Comment #3 From Richard Scott 2006-08-10 05:23:02 0000 -------
I've noticed that with this if you have two vblades running i.e. vblade.vblade0
and vblade.vblade1 when you shut down one of them the script kills all the
others too! :-(

------- Comment #4 From Sean Lynn 2007-01-04 09:35:04 0000 -------
I have included a fix for this in bug #159994 which bumps the version from 10
to 14.

As noted there, the basis of the problem was that the stop init script
contained the ${@} variable in it's grep for the vblade pids.  Unfortunately
the variable was never populated (try printing it out) since nothing was passed
to the stop scriipt.  My quick fix was to use the getconf variables to fully
reconstruct the start script command line.   Check it out and read my comments
about a Gentoo init script calling a bash script wrapper.

------- Comment #5 From Robin Johnson 2007-03-07 19:49:58 0000 -------
in cvs.