On 08/11/2013 07:54 AM, Roman Bogorodskiy wrote:
Provide an implementation of virNetDev(Set|Clear)IPv4Address based
on
BSD ifconfig tool in addition to 'ip' from Linux iproute2 package.
---
configure.ac | 15 +++++++++++++++
src/util/virnetdev.c | 24 ++++++++++++++++++++++++
2 files changed, 39 insertions(+)
if test $with_freebsd = yes; then
+ want_ifconfig=yes
+
with_firewalld=no
fi
@@ -2429,6 +2435,15 @@ AC_CHECK_DECLS([BRDGSFD, BRDGADD, BRDGDEL],
#include <net/if_bridgevar.h>
])
+# Check if we need to look for ifconfig
+if test "$want_ifconfig" = "yes"; then
+ AC_PATH_PROG([IFCONFIG_PATH], [ifconfig])
+ if test -z "$IFCONFIG_PATH"; then
+ AC_MSG_ERROR([Failed to find ifconfig.])
This means that configure will fail if ifconfig is not installed but
want_ifconfig was set. Are you certain enough that FreeBSD is likely to
have ifconfig by default, and thus not hit this failure except on
extremely unlikely configurations?
But I think it looks simple enough, with minimal risk of causing grief
on non-BSD systems (the configure check is guarded, so IFCONFIG_PATH is
likely to be unset on other platforms). ACK and pushed.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org