diff options
author | cheusov <cheusov@pkgsrc.org> | 2011-08-03 08:33:32 +0000 |
---|---|---|
committer | cheusov <cheusov@pkgsrc.org> | 2011-08-03 08:33:32 +0000 |
commit | 7a9cdb473e6faadfe6a8d7ffa58742fafdbb48f6 (patch) | |
tree | e26d84a9c21525d0b0b0f1e7764567220a7a0e29 /net | |
parent | cfb902d4a04441226b6ffc1233028a5bc9f3b458 (diff) | |
download | pkgsrc-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')
-rw-r--r-- | net/openvpn/Makefile | 11 | ||||
-rw-r--r-- | net/openvpn/files/openvpn.sh | 12 |
2 files changed, 21 insertions, 2 deletions
diff --git a/net/openvpn/Makefile b/net/openvpn/Makefile index fdd9faa5da3..2c355603f51 100644 --- a/net/openvpn/Makefile +++ b/net/openvpn/Makefile @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.42 2011/07/08 10:15:31 adam Exp $ +# $NetBSD: Makefile,v 1.43 2011/08/03 08:33:32 cheusov Exp $ DISTNAME= openvpn-2.2.1 +PKGREVISION= 1 CATEGORIES= net MASTER_SITES= http://swupdate.openvpn.net/community/releases/ @@ -41,6 +42,14 @@ SUBST_FILES.pkitool= easy-rsa/2.0/pkitool SUBST_SED.pkitool= -e "s|\\(GREP\\)=.*|\\1=\""${GREP:Q}"\"|" SUBST_SED.pkitool+= -e "s|\\(OPENSSL\\)=.*|\\1=\""${SSLBASE:Q}/bin/openssl"\"|" +.include "../../mk/bsd.prefs.mk" + +OPENVPN_USER?= openvpn +OPENVPN_GROUP?= openvpn +PKG_GROUPS= ${OPENVPN_GROUP} +PKG_USERS= ${OPENVPN_USER}:${OPENVPN_GROUP} +PKG_GECOS.${OPENVPN_USER}= OpenVPN\ server\ user + post-install: post-install-pam set -e; cd ${WRKSRC}/easy-rsa/2.0; for file in [a-zR]*; do \ case $$file in \ 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 |