[OpenWrt-Devel] [PATCH 2/3] packaget/network/services/openvpn: Drop ifconfig/route in favour of ip

openwrt at daniel.thecshore.com openwrt at daniel.thecshore.com
Wed Jan 20 14:22:04 EST 2016


From: Daniel Dickinson <openwrt at daniel.thecshore.com>

NB: Only compile tested.

Stop depending on ifconfig/route and use busybox (or real)
iproute2 utility instead.  Depend on virtual ip package provided
by previous commit so as not to force a particular version of
the ip command.

Signed-off-by: Daniel Dickinson <openwrt at daniel.thecshore.com>
---
 package/network/services/openvpn/Config-nossl.in    | 4 ----
 package/network/services/openvpn/Config-openssl.in  | 4 ----
 package/network/services/openvpn/Config-polarssl.in | 4 ----
 package/network/services/openvpn/Makefile           | 6 +++---
 4 files changed, 3 insertions(+), 15 deletions(-)

diff --git a/package/network/services/openvpn/Config-nossl.in b/package/network/services/openvpn/Config-nossl.in
index 3eaa228..24dbb03 100644
--- a/package/network/services/openvpn/Config-nossl.in
+++ b/package/network/services/openvpn/Config-nossl.in
@@ -40,10 +40,6 @@ config OPENVPN_nossl_ENABLE_PF
 	bool "Enable internal packet filter"
 	default y
 
-config OPENVPN_nossl_ENABLE_IPROUTE2
-	bool "Enable support for iproute2"
-	default n
-
 config OPENVPN_nossl_ENABLE_SMALL
 	bool "Enable size optimization"
 	default y
diff --git a/package/network/services/openvpn/Config-openssl.in b/package/network/services/openvpn/Config-openssl.in
index ac4c774..c7bd308 100644
--- a/package/network/services/openvpn/Config-openssl.in
+++ b/package/network/services/openvpn/Config-openssl.in
@@ -52,10 +52,6 @@ config OPENVPN_openssl_ENABLE_PF
 	bool "Enable internal packet filter"
 	default y
 
-config OPENVPN_openssl_ENABLE_IPROUTE2
-	bool "Enable support for iproute2"
-	default n
-
 config OPENVPN_openssl_ENABLE_SMALL
 	bool "Enable size optimization"
 	default y
diff --git a/package/network/services/openvpn/Config-polarssl.in b/package/network/services/openvpn/Config-polarssl.in
index 26692ce..501e0f3 100644
--- a/package/network/services/openvpn/Config-polarssl.in
+++ b/package/network/services/openvpn/Config-polarssl.in
@@ -52,10 +52,6 @@ config OPENVPN_polarssl_ENABLE_PF
 	bool "Enable internal packet filter"
 	default y
 
-config OPENVPN_polarssl_ENABLE_IPROUTE2
-	bool "Enable support for iproute2"
-	default n
-
 config OPENVPN_polarssl_ENABLE_SMALL
 	bool "Enable size optimization"
 	default y
diff --git a/package/network/services/openvpn/Makefile b/package/network/services/openvpn/Makefile
index 6c68b49..8edf97a 100644
--- a/package/network/services/openvpn/Makefile
+++ b/package/network/services/openvpn/Makefile
@@ -32,7 +32,7 @@ define Package/openvpn/Default
   URL:=http://openvpn.net
   SUBMENU:=VPN
   MENU:=1
-  DEPENDS:=+kmod-tun +OPENVPN_$(1)_ENABLE_LZO:liblzo +OPENVPN_$(1)_ENABLE_IPROUTE2:ip $(3)
+  DEPENDS:=+kmod-tun +OPENVPN_$(1)_ENABLE_LZO:liblzo $(3) +ip
   VARIANT:=$(1)
   MAINTAINER:=Mirko Vogt <mirko at openwrt.org>
 endef
@@ -42,6 +42,8 @@ Package/openvpn-polarssl=$(call Package/openvpn/Default,polarssl,PolarSSL,+libpo
 Package/openvpn-nossl=$(call Package/openvpn/Default,nossl,plaintext (no SSL))
 
 define Package/openvpn/config/Default
+	select PACKAGE_ip if !BUSYBOX_DEFAULT_IP
+
 	source "$(SOURCE)/Config-$(1).in"
 endef
 
@@ -60,8 +62,6 @@ CONFIG_OPENVPN_NOSSL:=y
 endif
 
 CONFIGURE_VARS += \
-	IFCONFIG=/sbin/ifconfig \
-	ROUTE=/sbin/route \
 	IPROUTE=/sbin/ip \
 	NETSTAT=/sbin/netstat
 
-- 
2.4.3
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list