- use exec directly to eliminate a level in the process tree - use "$@" instead of "$*" to pass arguments to openconnect According to openconnect(8), openconnect will call vpnc-script to cleanup before quit when it received SIGINT(2) and will quit immediately when it received SIGTERM (the default signal by kill command) Before and after the change, openconnect process will be killed first with SIGINT sent from netifd. This was decided by the 'proto_kill_command "$config" 2' notify call in the proto script. SIGKILL is the only other signal that can be sent from netifd when the process did not quit on SIGINT on time. There should be no need to trap on signal 1 3 6 9 (HUP QUIT ABRT KILL) Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
78 lines
2.3 KiB
Makefile
78 lines
2.3 KiB
Makefile
#
|
|
# Copyright (C) 2006-2015 OpenWrt.org
|
|
#
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
# See /LICENSE for more information.
|
|
#
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
PKG_NAME:=openconnect
|
|
PKG_VERSION:=7.08
|
|
PKG_RELEASE:=4
|
|
PKG_USE_MIPS16:=0
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|
PKG_SOURCE_URL:=ftp://ftp.infradead.org/pub/openconnect/
|
|
PKG_HASH:=1c44ec1f37a6a025d1ca726b9555649417f1d31a46f747922b84099ace628a03
|
|
PKG_LICENSE:=LGPLv2.1+
|
|
|
|
PKG_CONFIG_DEPENDS:= \
|
|
CONFIG_OPENCONNECT_GNUTLS \
|
|
CONFIG_OPENCONNECT_OPENSSL \
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
define Package/openconnect/config
|
|
source "$(SOURCE)/Config.in"
|
|
endef
|
|
|
|
define Package/openconnect
|
|
SECTION:=net
|
|
CATEGORY:=Network
|
|
DEPENDS:=+libxml2 +kmod-tun +resolveip +vpnc-scripts +OPENCONNECT_OPENSSL:libopenssl +OPENCONNECT_OPENSSL:p11-kit +OPENCONNECT_OPENSSL:libp11 +OPENCONNECT_GNUTLS:libgnutls +OPENCONNECT_STOKEN:libstoken
|
|
TITLE:=OpenConnect VPN client (Cisco AnyConnect compatible)
|
|
MAINTAINER:=Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
|
|
URL:=http://www.infradead.org/openconnect/
|
|
SUBMENU:=VPN
|
|
endef
|
|
|
|
define Package/openconnect/description
|
|
A VPN client compatible with Cisco's AnyConnect SSL VPN and ocserv.
|
|
|
|
OpenConnect is a client that follows the Cisco's AnyConnect SSL VPN protocol,
|
|
which is supported by IOS 12.4(9)T or later on Cisco SR500, 870, 880, 1800,
|
|
2800, 3800, 7200 Series and Cisco 7301 Routers, as well as the OpenConnect
|
|
VPN server.
|
|
endef
|
|
|
|
CONFIGURE_ARGS += \
|
|
--disable-shared \
|
|
--with-vpnc-script=/lib/netifd/vpnc-script \
|
|
--without-libpcsclite \
|
|
--without-stoken \
|
|
--without-lz4
|
|
|
|
ifeq ($(CONFIG_OPENCONNECT_OPENSSL),y)
|
|
CONFIGURE_ARGS += \
|
|
--without-gnutls
|
|
endif
|
|
|
|
ifeq ($(CONFIG_OPENCONNECT_STOKEN),y)
|
|
CONFIGURE_ARGS += \
|
|
--with-stoken
|
|
endif
|
|
|
|
define Package/openconnect/install
|
|
$(INSTALL_DIR) $(1)/etc/openconnect/
|
|
$(INSTALL_DIR) $(1)/lib/netifd/proto
|
|
$(INSTALL_BIN) ./files/openconnect.sh $(1)/lib/netifd/proto/
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/openconnect $(1)/usr/sbin/
|
|
$(INSTALL_BIN) ./files/openconnect-wrapper $(1)/usr/sbin/
|
|
$(INSTALL_DIR) $(1)/lib/upgrade/keep.d
|
|
$(INSTALL_DATA) ./files/openconnect.upgrade $(1)/lib/upgrade/keep.d/openconnect
|
|
endef
|
|
|
|
$(eval $(call BuildPackage,openconnect))
|