This commit is contained in:
TriForceX
2021-03-13 22:13:38 -03:00
parent c77595adbd
commit b3ecc6e32d
7043 changed files with 119377 additions and 73694 deletions

View File

@@ -11,13 +11,15 @@ CONFIG_DIR=/etc/openvpn
test -d $CONFIG_DIR || exit 0
start_vpn () {
/usr/sbin/openvpn --daemon --writepid /var/run/openvpn.$NAME.pid \
--config $CONFIG_DIR/$NAME.conf --cd $CONFIG_DIR || printf " FAILED->"
printf " $NAME"
printf " $NAME "
start-stop-daemon -S -p /var/run/openvpn.$NAME.pid -x /usr/sbin/openvpn -- \
--daemon --writepid /var/run/openvpn.$NAME.pid \
--config $CONFIG_DIR/$NAME.conf --cd $CONFIG_DIR
[ $? = 0 ] && echo "OK" || echo "FAIL"
}
stop_vpn () {
kill `cat $PIDFILE` || true
rm $PIDFILE
printf " $NAME "
start-stop-daemon -K -p /var/run/openvpn.$NAME.pid -x /usr/sbin/openvpn
}
case "$1" in
@@ -48,7 +50,6 @@ stop)
NAME=`echo $PIDFILE | cut -c18-`
NAME=${NAME%%.pid}
stop_vpn
printf " $NAME"
done
else
if test -e /var/run/openvpn.$2.pid ; then
@@ -56,7 +57,6 @@ stop)
NAME=`echo $PIDFILE | cut -c18-`
NAME=${NAME%%.pid}
stop_vpn
printf " $NAME"
else
printf " No such VPN: $2"
fi

View File

@@ -1,3 +1,3 @@
# Locally calculated after checking signature
sha256 a42f53570f669eaf10af68e98d65b531015ff9e12be7a62d9269ea684652f648 openvpn-2.4.7.tar.xz
sha256 641f3add8694b2ccc39fd4fd92554e4f089ad16a8db6d2b473ec284839a5ebe2 openvpn-2.4.9.tar.xz
sha256 1fcb78d7e478bb8a9408010bdc91b36e213b1facfad093df3f7ce7e28af19043 COPYRIGHT.GPL

View File

@@ -4,14 +4,13 @@
#
################################################################################
OPENVPN_VERSION = 2.4.7
OPENVPN_VERSION = 2.4.9
OPENVPN_SOURCE = openvpn-$(OPENVPN_VERSION).tar.xz
OPENVPN_SITE = http://swupdate.openvpn.net/community/releases
OPENVPN_DEPENDENCIES = host-pkgconf openssl
OPENVPN_LICENSE = GPL-2.0
OPENVPN_LICENSE_FILES = COPYRIGHT.GPL
OPENVPN_CONF_OPTS = \
--disable-plugin-auth-pam \
--enable-iproute2 \
--with-crypto-library=openssl \
$(if $(BR2_STATIC_LIBS),--disable-plugins)
@@ -38,6 +37,34 @@ else
OPENVPN_CONF_OPTS += --disable-lzo
endif
ifeq ($(BR2_PACKAGE_LIBSELINUX),y)
OPENVPN_DEPENDENCIES += libselinux
OPENVPN_CONF_OPTS += --enable-selinux
else
OPENVPN_CONF_OPTS += --disable-selinux
endif
ifeq ($(BR2_PACKAGE_LINUX_PAM),y)
OPENVPN_DEPENDENCIES += linux-pam
OPENVPN_CONF_OPTS += --enable-plugin-auth-pam
else
OPENVPN_CONF_OPTS += --disable-plugin-auth-pam
endif
ifeq ($(BR2_PACKAGE_PKCS11_HELPER),y)
OPENVPN_DEPENDENCIES += pkcs11-helper
OPENVPN_CONF_OPTS += --enable-pkcs11
else
OPENVPN_CONF_OPTS += --disable-pkcs11
endif
ifeq ($(BR2_PACKAGE_SYSTEMD),y)
OPENVPN_DEPENDENCIES += systemd
OPENVPN_CONF_OPTS += --enable-systemd
else
OPENVPN_CONF_OPTS += --disable-systemd
endif
define OPENVPN_INSTALL_TARGET_CMDS
$(INSTALL) -m 755 $(@D)/src/openvpn/openvpn \
$(TARGET_DIR)/usr/sbin/openvpn