cfengine-3.5.3-ifconfig.patch 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. diff -ur cfengine-3.5.3.orig/configure.ac cfengine-3.5.3/configure.ac
  2. --- cfengine-3.5.3.orig/configure.ac 2013-12-09 13:13:14.000000000 +0100
  3. +++ cfengine-3.5.3/configure.ac 2014-02-27 12:36:55.179893570 +0100
  4. @@ -1047,6 +1047,16 @@
  5. AM_SUBST_NOTMAKE(post_macros)
  6. dnl ######################################################################
  7. +dnl Find the path to ifconfig
  8. +dnl ######################################################################
  9. +
  10. +AC_PATH_PROG(IFCONFIG_PATH,ifconfig)
  11. +if test x"$IFCONFIG_PATH" = x"" ; then
  12. + AC_MSG_ERROR([Cannot found the ifconfig binary.])
  13. +fi
  14. +AC_DEFINE_UNQUOTED(IFCONFIG_RUN, "$IFCONFIG_PATH -a", [the path to run ifconfig -a])
  15. +
  16. +dnl ######################################################################
  17. dnl Summarize
  18. dnl ######################################################################
  19. diff -ur cfengine-3.5.3.orig/libpromises/unix.c cfengine-3.5.3/libpromises/unix.c
  20. --- cfengine-3.5.3.orig/libpromises/unix.c 2013-12-09 13:13:14.000000000 +0100
  21. +++ cfengine-3.5.3/libpromises/unix.c 2014-02-27 12:38:35.036608105 +0100
  22. @@ -767,7 +767,7 @@
  23. return;
  24. }
  25. #else
  26. - if ((pp = cf_popen("/sbin/ifconfig -a", "r", true)) == NULL)
  27. + if ((pp = cf_popen(IFCONFIG_RUN, "r", true)) == NULL)
  28. {
  29. Log(LOG_LEVEL_VERBOSE, "Could not find interface info");
  30. return;
  31. diff -ur cfengine-3.5.3.orig/libutils/config.h.in cfengine-3.5.3/libutils/config.h.in
  32. --- cfengine-3.5.3.orig/libutils/config.h.in 2013-12-09 13:55:25.000000000 +0100
  33. +++ cfengine-3.5.3/libutils/config.h.in 2014-02-27 12:39:41.537416111 +0100
  34. @@ -914,3 +914,6 @@
  35. /* Define to rpl_vsnprintf if the replacement function should be used. */
  36. #undef vsnprintf
  37. +
  38. +/* Define to the path for running ifconfig -a */
  39. +#undef IFCONFIG_RUN