Bug 6164

Summary: openvpn usage of ip tool from Busybox
Product: buildroot Reporter: Aleksandar <aleksandar.zivkovic>
Component: OtherAssignee: unassigned
Status: RESOLVED FIXED    
Severity: minor CC: buildroot, gustavo
Priority: P5    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Host: Target:
Build:

Description Aleksandar 2013-04-04 14:53:12 UTC
Overview: wrong condition for openvpn configuration on ip application usage

Steps to Reproduce:
Build openvpn without selected package BR2_PACKAGE_IPROUTE2

Actual Results: 
Built application will seek for ip tool in path /bin/ip which is location of BR2_PACKAGE_IPROUTE2. Location of Busybox version of ip is /sbin/ip

Expected Results:
If openvpn is build without selected package BR2_PACKAGE_IPROUTE2 it should select Busybox version of ip: /sbin/ip.


Build Date & Platform: BR 2013.02
Comment 1 Aleksandar 2013-04-04 14:54:36 UTC
Further mk file update solved problem on my side:

Index: openvpn.mk
===================================================================
--- openvpn.mk	(revision 12121)
+++ openvpn.mk	(revision 12122)
@@ -18,9 +18,9 @@
 endif
 
 ifeq ($(BR2_PACKAGE_IPROUTE2),y)
+OPENVPN_CONF_ENV += IPROUTE=/bin/ip
+else
 OPENVPN_CONF_ENV += IPROUTE=/sbin/ip
-else
-OPENVPN_CONF_ENV += IPROUTE=/bin/ip
 endif
 
 ifeq ($(BR2_PACKAGE_OPENVPN_LZO),y)
Comment 2 Gustavo Zacarias 2013-04-04 16:56:53 UTC
*SIGH*
Actually your modification isn't 100% correct.
Busybox <1.21.x places ip in /bin, >=1.21.x places it in /sbin (like the iproute2 package).
So some additional logic is needed.
I've just sent a patch to the list to address this, try http://patchwork.ozlabs.org/patch/233877/

Thanks for the headsup!
Comment 3 Gustavo Zacarias 2013-05-04 13:55:59 UTC
Fixed in git commit 1627fb54715406d6c76461d5104ee11dabbf5870 for the upcoming 2013.05 release.