Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 397863 | Differences between
and this patch

Collapse All | Expand All

(-)a/files/openvpn-2.1.init (-2 / +7 lines)
Lines 5-13 Link Here
5
VPNDIR=${VPNDIR:-/etc/openvpn}
5
VPNDIR=${VPNDIR:-/etc/openvpn}
6
VPN=${SVCNAME#*.}
6
VPN=${SVCNAME#*.}
7
if [ -n "${VPN}" ] && [ ${SVCNAME} != "openvpn" ]; then
7
if [ -n "${VPN}" ] && [ ${SVCNAME} != "openvpn" ]; then
8
	VPNPID="/var/run/openvpn.${VPN}.pid"
8
	VPNPID="/run/openvpn/openvpn.${VPN}.pid"
9
else
9
else
10
	VPNPID="/var/run/openvpn.pid"
10
	VPNPID="/run/openvpn/openvpn.pid"
11
fi
11
fi
12
VPNCONF="${VPNDIR}/${VPN}.conf"
12
VPNCONF="${VPNDIR}/${VPN}.conf"
13
13
Lines 106-111 Link Here
106
		grep -q "^[ 	]*group[ 	].*" "${VPNCONF}" || args="${args} --group openvpn"
106
		grep -q "^[ 	]*group[ 	].*" "${VPNCONF}" || args="${args} --group openvpn"
107
	fi
107
	fi
108
108
109
	local VPNUSR=`sed -n 's/^[ 	]*user[ 	]\(.*\)/\1/p' "${VPNCONF}"`
110
	local VPNGRP=`sed -n 's/^[ 	]*group[ 	]\(.*\)/\1/p' "${VPNCONF}"`
111
112
	checkpath -d -o "${VPNUSR:-openvpn}":"${VPNGRP:-openvpn}" -m 0750 "${VPNPID%/*}"
113
109
	# Ensure that our scripts get the PEER_DNS variable
114
	# Ensure that our scripts get the PEER_DNS variable
110
	[ -n "${PEER_DNS}" ] && args="${args} --setenv PEER_DNS ${PEER_DNS}"
115
	[ -n "${PEER_DNS}" ] && args="${args} --setenv PEER_DNS ${PEER_DNS}"
111
116

Return to bug 397863