SHA256
1
0
forked from pool/vpnc
vpnc/vpnc-pidfile-path.diff

45 lines
1.1 KiB
Diff
Raw Normal View History

Author: Stefan Seyfried <seife+obs@b1-systems.com>
Upstream: not yet
Subject: make pidfile writing work again
/var/run is cleared on every boot (tmpfs) and thus /var/run/vpnc
does not exist.
Just use /var/run/vpnc.pid instead, vpnc needs to run as root anyway,
so this should be fine.
vpnc-script is still using /var/run/vpnc for other stuff (resolv.conf
backup etc) but creates the directory on demand, so no harm is done
there.
Index: b/config.c
===================================================================
--- a/config.c
+++ b/config.c
@@ -182,11 +182,11 @@ static const char *config_def_script(voi
return "/etc/vpnc/vpnc-script";
}
static const char *config_def_pid_file(void)
{
- return "/var/run/vpnc/pid";
+ return "/var/run/vpnc.pid";
}
static const char *config_def_vendor(void)
{
return "cisco";
Index: b/vpnc-disconnect
===================================================================
--- a/vpnc-disconnect
+++ b/vpnc-disconnect
@@ -1,8 +1,8 @@
#!/bin/sh
-pid=/var/run/vpnc/pid
+pid=/var/run/vpnc.pid
if [ $# -ne 0 ]; then
echo "Usage: $0" 1>&2
exit 1
fi