summaryrefslogtreecommitdiff
path: root/net/openvpn/files
diff options
context:
space:
mode:
authorcheusov <cheusov@pkgsrc.org>2011-08-03 08:33:32 +0000
committercheusov <cheusov@pkgsrc.org>2011-08-03 08:33:32 +0000
commit7a9cdb473e6faadfe6a8d7ffa58742fafdbb48f6 (patch)
treee26d84a9c21525d0b0b0f1e7764567220a7a0e29 /net/openvpn/files
parentcfb902d4a04441226b6ffc1233028a5bc9f3b458 (diff)
downloadpkgsrc-7a9cdb473e6faadfe6a8d7ffa58742fafdbb48f6.tar.gz
rc.d script improvements:
- openvpn_chrootdir variable was introduced for running openvpn in chroot - openvpn_flags variable was introduced for extra flag passed to openvpn ++pkgrevision
Diffstat (limited to 'net/openvpn/files')
-rw-r--r--net/openvpn/files/openvpn.sh12
1 files changed, 11 insertions, 1 deletions
diff --git a/net/openvpn/files/openvpn.sh b/net/openvpn/files/openvpn.sh
index 42bc3edea60..1204d6ff964 100644
--- a/net/openvpn/files/openvpn.sh
+++ b/net/openvpn/files/openvpn.sh
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: openvpn.sh,v 1.3 2005/11/03 14:31:19 salo Exp $
+# $NetBSD: openvpn.sh,v 1.4 2011/08/03 08:33:33 cheusov Exp $
#
# PROVIDE: openvpn
# REQUIRE: NETWORKING
@@ -20,6 +20,11 @@
# # a process is started for all
# # *.conf files.
#
+# openvpn_chrootdir="dir" # Chroot to "dir" after initialization.
+# # See --chroot option for details.
+#
+# openvpn_flags="flags" # Flags to pass to the openvpn(8) command
+#
# The "reset" action will trigger a SIGUSR1 restart of the OpenVPN
# process. Please read the openvpn(8) man page for more details.
#
@@ -44,6 +49,11 @@ reset_cmd="openvpn_reset"
openvpn_start()
{
+ command_args="$command_args $openvpn_flags"
+ if test -n "$openvpn_chrootdir"; then
+ command_args="$command_args --chroot $openvpn_chrootdir"
+ fi
+
: ${openvpn_cfg="*.conf"}
for d in $required_dirs; do