[netcf-devel] [PATCH 6/9] add /sbin to ifup and ifdown paths.

Laine Stump laine at laine.org
Tue Mar 20 16:02:50 UTC 2012


On 03/20/2012 10:23 AM, Serge Hallyn wrote:
> In debian, /sbin won't be in $PATH.
>
> Index: netcf-0.1.9/src/drv_debian.c
> ===================================================================
> --- netcf-0.1.9.orig/src/drv_debian.c	2011-10-25 17:51:48.750682612 -0500
> +++ netcf-0.1.9/src/drv_debian.c	2011-10-25 22:18:12.647041910 -0500
> @@ -1044,7 +1044,7 @@
>   */
>  
>  int drv_if_up(struct netcf_if *nif) {
> -    static const char *const ifup = "ifup";
> +    static const char *const ifup = "/sbin/ifup";
>      struct netcf *ncf = nif->ncf;
>      int result = -1;
>  
> @@ -1056,7 +1056,7 @@
>  }
>  
>  int drv_if_down(struct netcf_if *nif) {
> -    static const char *const ifdown = "ifdown";
> +    static const char *const ifdown = "/sbin/ifdown";
>      struct netcf *ncf = nif->ncf;
>      int result = -1;

This path needs to be determined at runtime (or configure time) similar
to binary paths in libvirt.




More information about the netcf-devel mailing list