aboutsummaryrefslogtreecommitdiffstats
path: root/main/openvpn
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2018-05-06 19:43:59 +0200
committerJakub Jirutka <jakub@jirutka.cz>2018-05-06 21:30:15 +0200
commit39995d882d8edc530b3cfa2752fce19e74bbcfdf (patch)
tree64bdb8508cb0a1d78a3766335d35a1c78925c6ea /main/openvpn
parentd2e0d2c599f08f03f98ad0e59cdeb6a4f4ac294e (diff)
downloadaports-39995d882d8edc530b3cfa2752fce19e74bbcfdf.tar.bz2
aports-39995d882d8edc530b3cfa2752fce19e74bbcfdf.tar.xz
main/openvpn: rename deprecated $SVCNAME to $RC_SVCNAME
Diffstat (limited to 'main/openvpn')
-rw-r--r--main/openvpn/APKBUILD6
-rw-r--r--main/openvpn/openvpn.down10
-rw-r--r--main/openvpn/openvpn.initd16
-rw-r--r--main/openvpn/openvpn.up12
4 files changed, 22 insertions, 22 deletions
diff --git a/main/openvpn/APKBUILD b/main/openvpn/APKBUILD
index f135560950..9ccda4511d 100644
--- a/main/openvpn/APKBUILD
+++ b/main/openvpn/APKBUILD
@@ -60,7 +60,7 @@ pam() {
sha512sums="cdd70bfd03177bc6cb70d0d614e40389df00816b7097740b4cda9d7bee094d1463fdb5afeaf604c52c7b3167d1edb098a2e095e131a8b9fed0ed8b29da90cbe8 openvpn-2.4.6.tar.gz
5a083cdf8216db5e6e4577c00ccfe8e03ca318935ec9daa2018a8a6d4d7fd2b04fe395d7b329f16108101d69a6c0b70690883fda2cb552db7abf2f8246cc561f libressl.patch
-9210602b74c58594efc80163fcbf1f7359dc288936215706a1edf8b192623775c4eea3b6a2593946b64dffc33477a4775225bf96bff9b12ecc102c4cdfd3ea20 openvpn.initd
+a45753e26182bc88bc68ea6bfd50bc9f7494c43a9a5050bde450d558f38196bff88b2c4f85e5e5a4d7b798d15f201f204977e75a9b360a9f778d3c66bb3281b1 openvpn.initd
982ade883afbe2e656a9cbbe36c31c0e8b4f7bbbe5b63df9f7b834f02a9153032fb7445c85d3e91f62c68a7ddd13c3afbf420fb71cdd13d9c4b69f867bdd9f37 openvpn.confd
-f904d6125ed1ddb48ea632c3b290a7a4a7a7436be0d46b323fc8c92f919f9d076fdc78ff7bed0dd65675f0bc3559e531e372b805fc11ef287efeeb4d54fe52f4 openvpn.up
-8f2889dc92b57deaea15970945ac8b1bacdfa660e2a74ce13acaf6f9b431823fec82cdc7d942d0bacd1f54edf727c7c240a6eb8f7d0c745bc52838535c37c901 openvpn.down"
+cdb73c9a5b1eb56e9cbd29955d94297ce5a87079419cd626d6a0b6680d88cbf310735a53f794886df02030b687eaea553c7c569a8ea1282a149441add1c65760 openvpn.up
+4456880d5c2db061219ba94e4052786700efa5e685f03b0d12d75a6023e3c0fc7b5242cc3d2bd3988e42fcd99701ab13a6257b1a0943b812318d30c64843ad27 openvpn.down"
diff --git a/main/openvpn/openvpn.down b/main/openvpn/openvpn.down
index ad8910e8f3..50d463f16c 100644
--- a/main/openvpn/openvpn.down
+++ b/main/openvpn/openvpn.down
@@ -4,8 +4,8 @@
# Contributed by Roy Marples (uberlord@gentoo.org)
# If we have a service specific script, run this now
-if [ -x /etc/openvpn/"${SVCNAME}"-down.sh ] ; then
- /etc/openvpn/"${SVCNAME}"-down.sh "$@"
+if [ -x /etc/openvpn/"${RC_SVCNAME}"-down.sh ] ; then
+ /etc/openvpn/"${RC_SVCNAME}"-down.sh "$@"
fi
# Restore resolv.conf to how it was
@@ -20,11 +20,11 @@ if [ "${PEER_DNS}" != "no" ]; then
fi
fi
-if [ -n "${SVCNAME}" ]; then
+if [ -n "${RC_SVCNAME}" ]; then
# Re-enter the init script to start any dependant services
- if /etc/init.d/"${SVCNAME}" --quiet status ; then
+ if /etc/init.d/"${RC_SVCNAME}" --quiet status ; then
export IN_BACKGROUND=true
- /etc/init.d/"${SVCNAME}" --quiet stop
+ /etc/init.d/"${RC_SVCNAME}" --quiet stop
fi
fi
diff --git a/main/openvpn/openvpn.initd b/main/openvpn/openvpn.initd
index 5a07cdd7e5..2b6ddacbfa 100644
--- a/main/openvpn/openvpn.initd
+++ b/main/openvpn/openvpn.initd
@@ -5,8 +5,8 @@
description="VPN service"
VPNDIR=${VPNDIR:-/etc/openvpn}
-VPN=${SVCNAME#*.}
-if [ -n "${VPN}" ] && [ ${SVCNAME} != "openvpn" ]; then
+VPN=${RC_SVCNAME#*.}
+if [ -n "${VPN}" ] && [ ${RC_SVCNAME} != "openvpn" ]; then
VPNPID="/var/run/openvpn.${VPN}.pid"
else
VPNPID="/var/run/openvpn.pid"
@@ -41,7 +41,7 @@ start() {
# then we don't actually want to start openvpn
[ "${IN_BACKGROUND}" = "true" ] && return 0
- ebegin "Starting ${SVCNAME}"
+ ebegin "Starting ${RC_SVCNAME}"
checkconfig || return 1
@@ -68,7 +68,7 @@ start() {
ewarn "WARNING: You have defined your own up/down scripts"
ewarn "As you're running as a client, we now force Alpine specific"
ewarn "scripts to be run for up and down events."
- ewarn "These scripts will call /etc/openvpn/${SVCNAME}-{up,down}.sh"
+ ewarn "These scripts will call /etc/openvpn/${RC_SVCNAME}-{up,down}.sh"
ewarn "where you can put your own code."
fi
@@ -88,10 +88,10 @@ start() {
# Ensure that our scripts get the PEER_DNS variable
[ -n "${PEER_DNS}" ] && args="${args} --setenv PEER_DNS ${PEER_DNS}"
- [ "${reenter}" = "yes" ] && mark_service_inactive "${SVCNAME}"
+ [ "${reenter}" = "yes" ] && mark_service_inactive "${RC_SVCNAME}"
start-stop-daemon --start --exec /usr/sbin/openvpn --pidfile "${VPNPID}" \
-- --config "${VPNCONF}" --writepid "${VPNPID}" --daemon \
- --setenv SVCNAME "${SVCNAME}" ${args}
+ --setenv RC_SVCNAME "${RC_SVCNAME}" ${args}
eend $? "Check your logs to see why startup failed"
}
@@ -99,11 +99,11 @@ stop() {
# If we are re-called by the openvpn gentoo-down.sh script
# then we don't actually want to stop openvpn
if [ "${IN_BACKGROUND}" = "true" ] ; then
- mark_service_inactive "${SVCNAME}"
+ mark_service_inactive "${RC_SVCNAME}"
return 0
fi
- ebegin "Stopping ${SVCNAME}"
+ ebegin "Stopping ${RC_SVCNAME}"
start-stop-daemon --stop --quiet \
--exec /usr/sbin/openvpn --pidfile "${VPNPID}"
eend $?
diff --git a/main/openvpn/openvpn.up b/main/openvpn/openvpn.up
index 4a8868702d..2923bef7ac 100644
--- a/main/openvpn/openvpn.up
+++ b/main/openvpn/openvpn.up
@@ -61,19 +61,19 @@ if [ "${PEER_DNS}" != "no" ]; then
fi
# Below section is Gentoo specific
-# Quick summary - our init scripts are re-entrant and set the SVCNAME env var
+# Quick summary - our init scripts are re-entrant and set the RC_SVCNAME env var
# as we could have >1 openvpn service
-if [ -n "${SVCNAME}" ]; then
+if [ -n "${RC_SVCNAME}" ]; then
# If we have a service specific script, run this now
- if [ -x /etc/openvpn/"${SVCNAME}"-up.sh ] ; then
- /etc/openvpn/"${SVCNAME}"-up.sh "$@"
+ if [ -x /etc/openvpn/"${RC_SVCNAME}"-up.sh ] ; then
+ /etc/openvpn/"${RC_SVCNAME}"-up.sh "$@"
fi
# Re-enter the init script to start any dependant services
- if ! /etc/init.d/"${SVCNAME}" --quiet status ; then
+ if ! /etc/init.d/"${RC_SVCNAME}" --quiet status ; then
export IN_BACKGROUND=true
- /etc/init.d/${SVCNAME} --quiet start
+ /etc/init.d/${RC_SVCNAME} --quiet start
fi
fi