Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Sep 2015 16:30:28 +0000 (UTC)
From:      Kurt Jaeger <pi@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r395779 - in head/security: . softether softether/files
Message-ID:  <201509011630.t81GUSpC087159@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pi
Date: Tue Sep  1 16:30:28 2015
New Revision: 395779
URL: https://svnweb.freebsd.org/changeset/ports/395779

Log:
  New port: security/softether
  
  SoftEther VPN ("SoftEther" means "Software Ethernet") is a powerful,
  multi-OS and easy-to-use multi-protocol VPN software. It supports
  SSL-VPN (HTTPS), as well as OpenVPN, IPsec, L2TP, MS-SSTP, L2TPv3
  and EtherIP tunneling protocols and has a clone function to support
  OpenVPN clients.
  
  WWW: http://www.softether.org
  
  PR:		188437
  Submitted by:	net@arrishq.net
  Reviewed by:	marino

Added:
  head/security/softether/
  head/security/softether/Makefile   (contents, props changed)
  head/security/softether/distinfo   (contents, props changed)
  head/security/softether/files/
  head/security/softether/files/patch-src__Cedar__Cedar.h   (contents, props changed)
  head/security/softether/files/patch-src__Cedar__Client.h   (contents, props changed)
  head/security/softether/files/patch-src__Cedar__Nat.h   (contents, props changed)
  head/security/softether/files/patch-src__Cedar__Server.c   (contents, props changed)
  head/security/softether/files/patch-src__Mayaqua__Cfg.c   (contents, props changed)
  head/security/softether/files/patch-src__Mayaqua__Cfg.h   (contents, props changed)
  head/security/softether/files/patch-src__Mayaqua__Kernel.c   (contents, props changed)
  head/security/softether/files/patch-src__Mayaqua__Table.h   (contents, props changed)
  head/security/softether/files/patch-src__Mayaqua__Unix.c   (contents, props changed)
  head/security/softether/files/softether_bridge.in   (contents, props changed)
  head/security/softether/files/softether_client.in   (contents, props changed)
  head/security/softether/files/softether_server.in   (contents, props changed)
  head/security/softether/files/vpncmd.in   (contents, props changed)
  head/security/softether/pkg-descr   (contents, props changed)
  head/security/softether/pkg-message   (contents, props changed)
  head/security/softether/pkg-plist   (contents, props changed)
Modified:
  head/security/Makefile

Modified: head/security/Makefile
==============================================================================
--- head/security/Makefile	Tue Sep  1 16:22:12 2015	(r395778)
+++ head/security/Makefile	Tue Sep  1 16:30:28 2015	(r395779)
@@ -993,6 +993,7 @@
     SUBDIR += snortreport
     SUBDIR += snortsam
     SUBDIR += snortsnarf
+    SUBDIR += softether
     SUBDIR += softhsm
     SUBDIR += softhsm2
     SUBDIR += spass

Added: head/security/softether/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/softether/Makefile	Tue Sep  1 16:30:28 2015	(r395779)
@@ -0,0 +1,89 @@
+# $FreeBSD$
+
+PORTNAME=	softether
+PORTVERSION=	4.18.9570
+CATEGORIES=	security
+MASTER_SITES=	http://www.softether-download.com/files/softether/v4.18-9570-rtm-2015.07.26-tree/Source_Code/
+DISTNAME=	${PORTNAME}-src-v4.18-9570-rtm
+
+MAINTAINER=	net@arrishq.net
+COMMENT=	Softether VPN solution
+
+LICENSE=	GPLv2
+
+CPPFLAGS+=	-I${LOCALBASE}/include
+LDFLAGS+=	-L${LOCALBASE}/lib
+
+PORTDOCS=	AUTHORS.TXT ChangeLog LICENSE README THIRD_PARTY.TXT WARNING.TXT
+DOS2UNIX_FILES=	AUTHORS.TXT ChangeLog LICENSE README THIRD_PARTY.TXT \
+		WARNING.TXT \
+		src/Cedar/Cedar.h \
+		src/Cedar/Cedar.h \
+		src/Cedar/Client.h \
+		src/Cedar/Nat.h \
+		src/Cedar/Server.c \
+		src/Mayaqua/Cfg.c \
+		src/Mayaqua/Cfg.h \
+		src/Mayaqua/Kernel.c \
+		src/Mayaqua/Table.h \
+		src/Mayaqua/Unix.c
+
+OPTIONS_DEFINE=	DOCS
+
+ONLY_FOR_ARCHS=	i386 amd64
+
+USE_OPENSSL=	yes
+USES=		dos2unix gmake iconv ncurses readline
+USE_RC_SUBR=	softether_bridge softether_client softether_server
+SUB_FILES=	vpncmd
+
+# a pity the source directory has such a naming scheme, but well
+WRKSRC=		${WRKDIR}/v4.18-9570
+
+ALL_TARGET=	build
+
+.include <bsd.port.options.mk>
+
+# requires OpenSSL from ports
+.if ${OSVERSION} < 1000000
+WITH_OPENSSL_PORT=	yes
+MAKE_JOBS_UNSAFE=	yes
+.endif
+
+.if ${OSVERSION} >= 1000000
+BUILD_DEPENDS=		libiconv>=1.14:${PORTSDIR}/converters/libiconv
+.endif
+
+# skip configure at all and copy the corresponding Makefile in place
+post-extract:
+.if ${ARCH} != "amd64"
+	@${CP} ${WRKSRC}/src/makefiles/freebsd_32bit.mak ${WRKSRC}/Makefile
+.else
+	@${CP} ${WRKSRC}/src/makefiles/freebsd_64bit.mak ${WRKSRC}/Makefile
+.endif
+
+# pull in user specific CFLAGS and LDFLAGS
+	@${REINPLACE_CMD} -e "s|OPTIONS_COMPILE_RELEASE=|OPTIONS_COMPILE_RELEASE=${CFLAGS} |g" ${WRKSRC}/Makefile
+	@${REINPLACE_CMD} -e "s|OPTIONS_LINK_RELEASE=|OPTIONS_LINK_RELEASE=${LDFLAGS} |g" ${WRKSRC}/Makefile
+
+# manually install to ${PREFIX}/libexec/softether, then the final install will copy scripts
+# into ${PREFIX}/sbin
+do-install:
+	${MKDIR} ${STAGEDIR}/${PREFIX}/libexec/softether
+	${INSTALL_SCRIPT} ${WRKSRC}/bin/vpnbridge/vpnbridge ${STAGEDIR}/${PREFIX}/libexec/${PORTNAME}/vpnbridge
+	${INSTALL_SCRIPT} ${WRKSRC}/bin/vpnclient/vpnclient ${STAGEDIR}/${PREFIX}/libexec/${PORTNAME}/vpnclient
+	${INSTALL_SCRIPT} ${WRKSRC}/bin/vpncmd/vpncmd ${STAGEDIR}/${PREFIX}/libexec/${PORTNAME}/vpncmd
+	${INSTALL_SCRIPT} ${WRKSRC}/bin/vpnserver/vpnserver ${STAGEDIR}/${PREFIX}/libexec/${PORTNAME}/vpnserver
+	${INSTALL_DATA} ${WRKSRC}/bin/vpnserver/hamcore.se2 ${STAGEDIR}/${PREFIX}/libexec/${PORTNAME}/hamcore.se2
+	${INSTALL_SCRIPT} ${WRKDIR}/vpncmd ${STAGEDIR}/${PREFIX}/sbin/vpncmd
+
+post-install:
+.for i in vpnbridge vpnclient vpncmd vpnserver
+	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/libexec/${PORTNAME}/${i}
+.endfor
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+.for doc in ${PORTDOCS}
+	${INSTALL_DATA} ${WRKSRC}/${doc} ${STAGEDIR}${DOCSDIR}
+.endfor
+
+.include <bsd.port.mk>

Added: head/security/softether/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/softether/distinfo	Tue Sep  1 16:30:28 2015	(r395779)
@@ -0,0 +1,2 @@
+SHA256 (softether-src-v4.18-9570-rtm.tar.gz) = 585d61e524d3cad90806cbeb52ebe54b5144359e6c44676e8e7fb5683ffd4574
+SIZE (softether-src-v4.18-9570-rtm.tar.gz) = 35180998

Added: head/security/softether/files/patch-src__Cedar__Cedar.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/softether/files/patch-src__Cedar__Cedar.h	Tue Sep  1 16:30:28 2015	(r395779)
@@ -0,0 +1,75 @@
+--- src/Cedar/Cedar.h.orig	2014-06-08 06:19:15 UTC
++++ src/Cedar/Cedar.h
+@@ -477,22 +477,22 @@
+ #define	LOG_ENGINE_BUFFER_CACHE_SIZE_MAX	(10 * 1024 * 1024)	// Write cache size
+ 
+ // Constant such as a file name
+-#define	SERVER_LOG_DIR_NAME			"@server_log"
++#define	SERVER_LOG_DIR_NAME			"/var/db/softether/server_log"
+ #define	BRIDGE_LOG_DIR_NAME			SERVER_LOG_DIR_NAME
+ #define	SERVER_LOG_PERFIX			"vpn"
+ 
+-#define	HUB_SECURITY_LOG_DIR_NAME	"@security_log"
+-#define	HUB_SECURITY_LOG_FILE_NAME	"@security_log/%s"
++#define	HUB_SECURITY_LOG_DIR_NAME	"/var/db/softether/security_log"
++#define	HUB_SECURITY_LOG_FILE_NAME	"/var/db/softether/security_log/%s"
+ #define	HUB_SECURITY_LOG_PREFIX		"sec"
+-#define	HUB_PACKET_LOG_DIR_NAME		"@packet_log"
+-#define	HUB_PACKET_LOG_FILE_NAME	"@packet_log/%s"
++#define	HUB_PACKET_LOG_DIR_NAME		"/var/db/softether/packet_log"
++#define	HUB_PACKET_LOG_FILE_NAME	"/var/db/softether/packet_log/%s"
+ #define	HUB_PACKET_LOG_PREFIX		"pkt"
+ 
+-#define	NAT_LOG_DIR_NAME			"@secure_nat_log"
+-#define	NAT_LOG_FILE_NAME			"@secure_nat_log/%s"
++#define	NAT_LOG_DIR_NAME			"/var/db/softether/secure_nat_log"
++#define	NAT_LOG_FILE_NAME			"/var/db/softether/secure_nat_log/%s"
+ #define	NAT_LOG_PREFIX				"snat"
+ 
+-#define	CLIENT_LOG_DIR_NAME			"@client_log"
++#define	CLIENT_LOG_DIR_NAME			"/var/db/softether/client_log"
+ #define	CLIENT_LOG_PREFIX			"client"
+ 
+ // Packet log settings
+@@ -527,8 +527,8 @@
+ #define	DISK_FREE_CHECK_INTERVAL	(5 * 60 * 1000)
+ 
+ // Simple log
+-#define TINY_LOG_DIRNAME			"@tiny_log"
+-#define TINY_LOG_FILENAME			"@tiny_log/%04u%02u%02u_%02u%02u%02u.log"
++#define TINY_LOG_DIRNAME			"/var/db/softether/tiny_log"
++#define TINY_LOG_FILENAME			"/var/db/softether/tiny_log/%04u%02u%02u_%02u%02u%02u.log"
+ 
+ 
+ //////////////////////////////////////////////////////////////////////
+@@ -541,7 +541,7 @@
+ //#define CE_SNAPSHOT_INTERVAL		((UINT64)(3000))
+ #define CE_SNAPSHOT_POLLING_INTERVAL	(1 * 1000)
+ #define CE_SNAPSHOT_POLLING_INTERVAL_LICENSE	(30 * 1000)
+-#define CE_SNAPSHOT_DIR_NAME		"@carrier_log"
++#define CE_SNAPSHOT_DIR_NAME		"/var/db/softether/carrier_log"
+ #define CE_SNAPSHOT_PREFIX			"carrier"
+ 
+ 
+@@ -558,7 +558,7 @@
+ // Expiration date of random size cache
+ #define	RAND_SIZE_CACHE_EXPIRE		(24 * 60 * 60 * 1000)
+ // Management allowed IP address list file name
+-#define	ADMINIP_TXT					"@adminip.txt"
++#define	ADMINIP_TXT					"/var/db/softether/adminip.txt"
+ 
+ #define NON_SSL_MIN_COUNT			60
+ #define NON_SSL_ENTRY_EXPIRES		(10 * 60 * 1000)
+@@ -609,9 +609,9 @@
+ //////////////////////////////////////////////////////////////////////
+ 
+ #define	EL_ADMIN_PORT			22888
+-#define	EL_CONFIG_FILENAME		"@etherlogger.config"
+-#define	EL_PACKET_LOG_DIR_NAME	"@etherlogger_log"
+-#define	EL_PACKET_LOG_FILE_NAME	"@etherlogger_log/%s"
++#define	EL_CONFIG_FILENAME		"/var/db/softether/etherlogger.config"
++#define	EL_PACKET_LOG_DIR_NAME	"/var/db/softether/etherlogger_log"
++#define	EL_PACKET_LOG_FILE_NAME	"/var/db/softether/etherlogger_log/%s"
+ #define	EL_PACKET_LOG_PREFIX	"pkt"
+ #define	EL_LICENSE_CHECK_SPAN	(10 * 1000)
+ 

Added: head/security/softether/files/patch-src__Cedar__Client.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/softether/files/patch-src__Cedar__Client.h	Tue Sep  1 16:30:28 2015	(r395779)
@@ -0,0 +1,20 @@
+--- src/Cedar/Client.h.orig	2014-06-08 06:19:15 UTC
++++ src/Cedar/Client.h
+@@ -125,7 +125,7 @@
+ 
+ 
+ // Constants
+-#define	CLIENT_CONFIG_FILE_NAME				"@vpn_client.config"
++#define	CLIENT_CONFIG_FILE_NAME				"/var/db/softether/vpn_client.config"
+ #define	CLIENT_DEFAULT_KEEPALIVE_HOST		"keepalive.softether.org"
+ #define	CLIENT_DEFAULT_KEEPALIVE_PORT		80
+ #define	CLIENT_DEFAULT_KEEPALIVE_INTERVAL	KEEP_INTERVAL_DEFAULT
+@@ -145,7 +145,7 @@
+ #define	CLIENT_WIN32_EXE_FILENAME_X64		"vpnclient_x64.exe"
+ #define	CLIENT_WIN32_EXE_FILENAME_IA64		"vpnclient_ia64.exe"
+ 
+-#define CLIENT_CUSTOM_INI_FILENAME			"@custom.ini"
++#define CLIENT_CUSTOM_INI_FILENAME			"/var/db/softether/custom.ini"
+ 
+ #define	CLIENT_GLOBAL_PULSE_NAME			"clientglobalpulse"
+ 

Added: head/security/softether/files/patch-src__Cedar__Nat.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/softether/files/patch-src__Cedar__Nat.h	Tue Sep  1 16:30:28 2015	(r395779)
@@ -0,0 +1,11 @@
+--- src/Cedar/Nat.h.orig	2014-06-08 06:19:15 UTC
++++ src/Cedar/Nat.h
+@@ -115,7 +115,7 @@
+ #define	NAT_H
+ 
+ // Constants
+-#define	NAT_CONFIG_FILE_NAME			"@vpn_router.config"	// NAT configuration file
++#define	NAT_CONFIG_FILE_NAME			"/var/db/softether/vpn_router.config"	// NAT configuration file
+ #define	DEFAULT_NAT_ADMIN_PORT			2828		// Default port number for management
+ #define	NAT_ADMIN_PORT_LISTEN_INTERVAL	1000		// Interval for trying to open a port for management
+ #define	NAT_FILE_SAVE_INTERVAL			(30 * 1000)	// Interval to save

Added: head/security/softether/files/patch-src__Cedar__Server.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/softether/files/patch-src__Cedar__Server.c	Tue Sep  1 16:30:28 2015	(r395779)
@@ -0,0 +1,21 @@
+--- src/Cedar/Server.c.orig	2014-06-08 06:19:15 UTC
++++ src/Cedar/Server.c
+@@ -115,12 +115,12 @@
+ 
+ static SERVER *server = NULL;
+ static LOCK *server_lock = NULL;
+-char *SERVER_CONFIG_FILE_NAME = "@vpn_server.config";
+-char *SERVER_CONFIG_FILE_NAME_IN_CLIENT = "@vpn_gate_svc.config";
+-char *SERVER_CONFIG_FILE_NAME_IN_CLIENT_RELAY = "@vpn_gate_relay.config";
+-char *BRIDGE_CONFIG_FILE_NAME = "@vpn_bridge.config";
+-char *SERVER_CONFIG_TEMPLATE_NAME = "@vpn_server_template.config";
+-char *BRIDGE_CONFIG_TEMPLATE_NAME = "@vpn_server_template.config";
++char *SERVER_CONFIG_FILE_NAME = "/var/db/softether/vpn_server.config";
++char *SERVER_CONFIG_FILE_NAME_IN_CLIENT = "/var/db/softether/vpn_gate_svc.config";
++char *SERVER_CONFIG_FILE_NAME_IN_CLIENT_RELAY = "/var/db/softether/vpn_gate_relay.config";
++char *BRIDGE_CONFIG_FILE_NAME = "/var/db/softether/vpn_bridge.config";
++char *SERVER_CONFIG_TEMPLATE_NAME = "/var/db/softether/vpn_server_template.config";
++char *BRIDGE_CONFIG_TEMPLATE_NAME = "/var/db/softether/vpn_server_template.config";
+ 
+ static bool server_reset_setting = false;
+ 

Added: head/security/softether/files/patch-src__Mayaqua__Cfg.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/softether/files/patch-src__Mayaqua__Cfg.c	Tue Sep  1 16:30:28 2015	(r395779)
@@ -0,0 +1,11 @@
+--- src/Mayaqua/Cfg.c.orig	2014-06-08 06:19:14 UTC
++++ src/Mayaqua/Cfg.c
+@@ -124,7 +124,7 @@
+ 	}
+ 
+ 	// Determine the directory name
+-	UniFormat(dirname, sizeof(dirname), L"@backup.%s", original[0] == L'@' ? original + 1 : original);
++	UniFormat(dirname, sizeof(dirname), L"/var/db/softether/backup.%s", original[0] == L'@' ? original + 1 : original);
+ 
+ 	// Determine the file name
+ 	LocalTime(&st);

Added: head/security/softether/files/patch-src__Mayaqua__Cfg.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/softether/files/patch-src__Mayaqua__Cfg.h	Tue Sep  1 16:30:28 2015	(r395779)
@@ -0,0 +1,11 @@
+--- src/Mayaqua/Cfg.h.orig	2014-06-08 06:19:14 UTC
++++ src/Mayaqua/Cfg.h
+@@ -102,7 +102,7 @@
+ // Macro
+ //#define	CHECK_CFG_NAME_EXISTS			// Check duplication of the existing name
+ 
+-#define	SAVE_BINARY_FILE_NAME_SWITCH	L"@save_binary"
++#define	SAVE_BINARY_FILE_NAME_SWITCH	L"/var/db/softether/save_binary"
+ 
+ // Constants
+ #define	TAG_DECLARE			"declare"

Added: head/security/softether/files/patch-src__Mayaqua__Kernel.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/softether/files/patch-src__Mayaqua__Kernel.c	Tue Sep  1 16:30:28 2015	(r395779)
@@ -0,0 +1,11 @@
+--- src/Mayaqua/Kernel.c.orig	2014-06-08 06:19:14 UTC
++++ src/Mayaqua/Kernel.c
+@@ -2160,7 +2160,7 @@
+ 		msg = "Unknown Error";
+ 	}
+ 
+-	f = fopen("abort_error_log.txt", "w");
++	f = fopen("/var/db/softether/abort_error_log.txt", "w");
+ 	if (f != NULL)
+ 	{
+ 		fwrite(msg, 1, strlen(msg), f);

Added: head/security/softether/files/patch-src__Mayaqua__Table.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/softether/files/patch-src__Mayaqua__Table.h	Tue Sep  1 16:30:28 2015	(r395779)
@@ -0,0 +1,11 @@
+--- src/Mayaqua/Table.h.orig	2014-06-08 06:19:14 UTC
++++ src/Mayaqua/Table.h
+@@ -102,7 +102,7 @@
+ #define	UNICODE_CACHE_FILE		L".unicode_cache_%s.dat"
+ 
+ #define	LANGLIST_FILENAME		"|languages.txt"
+-#define	LANG_CONFIG_FILENAME	L"@lang.config"
++#define	LANG_CONFIG_FILENAME	L"/var/db/softether/lang.config"
+ #define	LANG_CONFIG_TEMPLETE	"|lang.config"
+ 
+ // Language constant

Added: head/security/softether/files/patch-src__Mayaqua__Unix.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/softether/files/patch-src__Mayaqua__Unix.c	Tue Sep  1 16:30:28 2015	(r395779)
@@ -0,0 +1,29 @@
+--- src/Mayaqua/Unix.c.orig	2014-06-08 06:19:14 UTC
++++ src/Mayaqua/Unix.c
+@@ -916,7 +916,7 @@
+ 	GetExeDir(dir, sizeof(dir));
+ 
+ 	// File name generation
+-	Format(name, sizeof(name), "%s/.%s", dir, tmp);
++	Format(name, sizeof(name), "/var/db/softether/.%s", tmp);
+ 
+ 	fd = open(name, O_WRONLY);
+ 	if (fd == -1)
+@@ -2254,7 +2254,7 @@
+ 	Hash(hash, exe_name, StrLen(exe_name), false);
+ 	BinToStr(tmp1, sizeof(tmp1), hash, sizeof(hash));
+ 
+-	Format(name, size, "%s/.pid_%s", dir, tmp1);
++	Format(name, size, "/var/db/softether/.pid_%s", tmp1);
+ }
+ 
+ // Delete the PID file
+@@ -2299,7 +2299,7 @@
+ 	Hash(hash, exe_name, StrLen(exe_name), false);
+ 	BinToStr(tmp1, sizeof(tmp1), hash, sizeof(hash));
+ 
+-	Format(name, size, "%s/.ctl_%s", dir, tmp1);
++	Format(name, size, "/var/db/softether/.ctl_%s", tmp1);
+ }
+ 
+ // Write the CTL file

Added: head/security/softether/files/softether_bridge.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/softether/files/softether_bridge.in	Tue Sep  1 16:30:28 2015	(r395779)
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+# PROVIDE: softether_bridge
+# REQUIRE: NETWORKING SERVERS
+# BEFORE: DAEMON
+# KEYWORD: shutdown
+
+#
+# Add the following lines to /etc/rc.conf to enable softether_bridge:
+# softether_bridge_enable (bool):  Set to "NO" by default.
+#                                  Set it to "YES" to enable
+#
+. /etc/rc.subr
+
+name=softether_bridge
+rcvar=softether_bridge_enable
+load_rc_config ${name}
+
+: ${softether_bridge_enable:=NO}
+
+command="%%PREFIX%%/libexec/softether/vpnbridge"
+
+datadir="/var/db/softether"
+
+start_precmd="${name}_precmd"
+start_cmd="${command} start"
+stop_cmd="${command} stop"
+
+softether_bridge_precmd()
+{
+	if [ ! -d "${datadir}" ]; then
+	    mkdir -p ${datadir}
+	fi
+}
+
+run_rc_command "$1"

Added: head/security/softether/files/softether_client.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/softether/files/softether_client.in	Tue Sep  1 16:30:28 2015	(r395779)
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+# PROVIDE: softether_client
+# REQUIRE: NETWORKING SERVERS
+# BEFORE: DAEMON
+# KEYWORD: shutdown
+
+#
+# Add the following lines to /etc/rc.conf to enable softether_client:
+# softether_client_enable (bool):  Set to "NO" by default.
+#                                  Set it to "YES" to enable
+#
+. /etc/rc.subr
+
+name=softether_client
+rcvar=softether_client_enable
+load_rc_config ${name}
+
+: ${softether_client_enable:=NO}
+
+command="%%PREFIX%%/libexec/softether/vpnclient"
+
+datadir="/var/db/softether"
+
+start_precmd="${name}_precmd"
+start_cmd="${command} start"
+stop_cmd="${command} stop"
+
+softether_client_precmd()
+{
+	if [ ! -d "${datadir}" ]; then
+	    mkdir -p ${datadir}
+	fi
+}
+
+run_rc_command "$1"

Added: head/security/softether/files/softether_server.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/softether/files/softether_server.in	Tue Sep  1 16:30:28 2015	(r395779)
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+# PROVIDE: softether_server
+# REQUIRE: NETWORKING SERVERS
+# BEFORE: DAEMON
+# KEYWORD: shutdown
+
+#
+# Add the following lines to /etc/rc.conf to enable softether_server:
+# softether_server_enable (bool):  Set to "NO" by default.
+#                                  Set it to "YES" to enable
+#
+. /etc/rc.subr
+
+name=softether_server
+rcvar=softether_server_enable
+load_rc_config ${name}
+
+: ${softether_server_enable:=NO}
+
+command="%%PREFIX%%/libexec/softether/vpnserver"
+
+datadir="/var/db/softether"
+
+start_precmd="${name}_precmd"
+start_cmd="${command} start"
+stop_cmd="${command} stop"
+
+softether_server_precmd()
+{
+	if [ ! -d "${datadir}" ]; then
+	    mkdir -p ${datadir}
+	fi
+}
+
+run_rc_command "$1"

Added: head/security/softether/files/vpncmd.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/softether/files/vpncmd.in	Tue Sep  1 16:30:28 2015	(r395779)
@@ -0,0 +1,6 @@
+#!/bin/sh
+#
+# wrapper script for vpncmd, the configuration binary for
+# SoftEther vpn
+#
+%%PREFIX%%/libexec/softether/vpncmd ${1+"$@"}

Added: head/security/softether/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/softether/pkg-descr	Tue Sep  1 16:30:28 2015	(r395779)
@@ -0,0 +1,7 @@
+SoftEther VPN ("SoftEther" means "Software Ethernet") is a powerful,
+multi-OS and easy-to-use multi-protocol VPN software. It supports
+SSL-VPN (HTTPS), as well as OpenVPN, IPsec, L2TP, MS-SSTP, L2TPv3
+and EtherIP tunneling protocols and has a clone function to support
+OpenVPN clients.
+
+WWW: http://www.softether.org

Added: head/security/softether/pkg-message
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/softether/pkg-message	Tue Sep  1 16:30:28 2015	(r395779)
@@ -0,0 +1,19 @@
+**************************************************************************
+
+To run softether vpn server from startup, add
+softether_server_enable="YES" in your rc.conf.
+
+To run softether vpn bridge from startup, add
+softether_bridge_enable="YES" in your rc.conf.
+
+To run softether vpn client from startup, add
+softether_client_enable="YES" in your rc.conf.
+
+Initial and further configuration of all softether services can be
+done either by using a Windows client to connect to the running
+services or by vpncmd from command line.
+
+When removing SoftEther VPN without the desire to reinstall, please
+ensure to remove the directory /var/db/softether as well.
+
+**************************************************************************

Added: head/security/softether/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/softether/pkg-plist	Tue Sep  1 16:30:28 2015	(r395779)
@@ -0,0 +1,7 @@
+libexec/softether/hamcore.se2
+libexec/softether/vpnbridge
+libexec/softether/vpnclient
+libexec/softether/vpncmd
+libexec/softether/vpnserver
+sbin/vpncmd
+@dir libexec/softether



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201509011630.t81GUSpC087159>