[netcf-devel] [PATCH 6/7] Use a copy of shellvars.aug instead of the one in augeas

Jonas Eriksson jonas.j.eriksson at ericsson.com
Thu Jul 30 06:08:37 UTC 2009


On Wed, Jul 29, 2009 at 06:41:17PM +0200 David Lutterkort wrote:
> On Thu, 2009-07-23 at 14:37 +0200, Jonas Eriksson wrote:
> > This is the first in a two-stage commit where we move from
> > the standard shellvars-lens to one that strips the single
> > quotes before and after strings. data/lenses/ifcfg.aug is
> > currently only a copy of the augeas lens, except for the
> > lens name.
> 
> I don't understand why that is needed - what's the issue this
> addresses ?

This is in respose to this mail:
Subject: Re: [netcf-devel] SuSE driver
From: David Lutterkort <lutter at redhat.com>
Message-Id: <1246058729.4572.113.camel at avon.watzmann.net>

..where the ' and " surrounding ifcfg-strings were discussed. In
the case of the initscripts driver, this seems to only be handled
for the BONDING_OPTS "variable". I however assume that the
configuration still is valid if the file contains:
DEVICE='eth0'

In SuSE (at least SLES), this is a big problem. The default
ifcfg-lo has all strings surrounded by '', and as aug_get returns
const char*:s, all these have to be strdup:ed and striped before
being usable. In order to avoid this in the C-code of the driver,
the most resonable solution seem to be to ship a '"-stripping
augeas lense.

> also, since netcf does not autoload any files, and sets up what gets
> loaded manually, there's no need to have the filter etc. in the lens;
> you can delete the 'autload xfm' at the top of the file and everything
> from 'let sc_incl ...' to the end of the file.

That's very true, although I would have done it in the next
patch.

/Jonas

--
Jonas Eriksson
Consultant at AS/EAB/FLJ/IL
Combitech AB
Älvsjö, Sweden


More information about the netcf-devel mailing list