mirror of
https://github.com/MiyooCFW/buildroot.git
synced 2025-09-27 22:24:19 +03:00
Merge from bittboy/buildroot@26c91a9
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user