Bug 6164 - openvpn usage of ip tool from Busybox
Summary: openvpn usage of ip tool from Busybox
Status: RESOLVED FIXED
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: PC Linux
: P5 minor
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-04 14:53 UTC by Aleksandar
Modified: 2013-05-04 13:55 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.