Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 310687 - net-misc/vpnc's /etc/init.d terminates all vpnc's on stop request
Summary: net-misc/vpnc's /etc/init.d terminates all vpnc's on stop request
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Christian Faulhammer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-22 12:06 UTC by Dirk Tilger
Modified: 2010-03-23 22:54 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch against the /etc/init.d/vpnc to fix the problem. (vpnc-init.d.patch,370 bytes, patch)
2010-03-22 12:09 UTC, Dirk Tilger
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Tilger 2010-03-22 12:06:25 UTC
The vpnc script is made in a way that allows running multiple services. You symlink /etc/init.d/vpnc to /etc/init.d/vpnc.first and /etc/init.d/vpnc.second and create the configuration files /etc/vpnc/first.conf and /etc/vpnc/second.conf and you have two independent vpnc services.

However, if you issue a stop command to either of them, both are stopped. That is because the service script calls:

start-stop-daemon --stop --exec /usr/sbin/vpnc --pidfile "${VPNPID}"

According to the manual of start-stop-daemon the --exec option stands for "Check for processes that are instances of this executable (according to /proc/ pid /exe )". That applies to both of them. Removing that part fixes the problem.


Reproducible: Always

Steps to Reproduce:
1. Create two independent vpnc configurations and start scripts
2. Start both
3. Stop one of them

Actual Results:  
Both daemons get stopped.

Expected Results:  
Only the daemon specified gets stopped.
Comment 1 Dirk Tilger 2010-03-22 12:09:07 UTC
Created attachment 224657 [details, diff]
Patch against the /etc/init.d/vpnc to fix the problem.
Comment 2 Christian Faulhammer (RETIRED) gentoo-dev 2010-03-23 22:54:14 UTC
Thanks for your patch and report.  This is fixed in CVS.