[netcf-devel] Missing vlans
Hendrik Schwartke
hendrik at os-t.de
Thu Sep 13 07:33:14 UTC 2012
Hi Laine,
did you already have a look at this small patch?
The point is that the software I'm working on has to create bridges with
two vlans.
Now I have to decide whether to use netcf or to search for a workaround.
Best regards
Hendrik
On 05.09.2012 16:24, Hendrik Schwartke wrote:
> Two (or more) nodes with identical names that are in the same
> element are passed to libaugeas in such a way that only the last
> node is actually written to the config file.
> If e.g. there are two pre-up commands for a bridge on debian only
> one is written to /etc/network/interfaces.
> This fix changes this behaviour so that all of them are written.
> ---
> src/drv_debian.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/drv_debian.c b/src/drv_debian.c
> index 04953e3..1bf7558 100644
> --- a/src/drv_debian.c
> +++ b/src/drv_debian.c
> @@ -679,7 +679,7 @@ static int aug_put_xml(struct netcf *ncf, xmlDocPtr xml) {
> label = xml_prop(node, "label");
> value = xml_prop(node, "value");
>
> - r = aug_fmt_set(ncf, value, "%s/%s[%d]/%s",
> + r = aug_fmt_set(ncf, value, "%s/%s[%d]/%s[last()+1]",
> network_interfaces_path,
> arraylabel, n, label ? label : "1");
> ERR_COND_BAIL(r< 0, ncf, EOTHER);
More information about the netcf-devel
mailing list