[augeas-devel] Re: [PATCH] Add default lens (the equivalent of sysconfig on Debian systems)
David Lutterkort
lutter at redhat.com
Fri Sep 5 17:09:18 UTC 2008
On Fri, 2008-09-05 at 18:59 +0200, Free Ekanayaka wrote:
> |--==> On Fri, 05 Sep 2008 16:41:17 +0000, David Lutterkort <lutter at redhat.com> said:
>
> DL> On Fri, 2008-09-05 at 12:11 +0200, Free Ekanayaka wrote:
> >># HG changeset patch
> >># User Free Ekanayaka <free at 64studio.com>
> >># Date 1220609447 -7200
> >># Node ID 5293b6f11f988f2dafc7122c9ec3cae3504a6a63
> >># Parent 76b4a5665cd6a32cc46131091c2860176b864033
> >>Add default lens (the equivalent of sysconfig on Debian systems)
>
> DL> This looks good, except that the module name is a little too generic.
> DL> Can we call this Debian_default or something similar ?
>
> At the moment the shellvars.aug module is used by
>
> ifcfg.aug
> sysconfig.aug
> default.aug
>
> but none of them actually adds some more information to Shellvars. So
> why not merging all of them directly in shellvars?
Yeah, that's a good idea.
> I guess just adding something like:
>
> let filter = Util.stdexcl
> . incl "/etc/sysconfig/*"
> . incl "/etc/default/*"
> . incl "/etc/sysconfig/network-scripts/ifcfg"
You can't include all of /etc/sysconfig, since there are files in there
that are not shellvars files (like iptables)
And to make it a little clearer, we should have three filters:
let filter_sysconfig = ... filter from current sysconfig.aug ..
let filter_ifcfg = .. filter from ifcfg.aug ..
let filter_default = .. filter for /etc/default ..
let filter = filter_sysconfig
. filter_ifcfg
. filter_default
. Util.stdexcl
Can you make a patch to that effect ?
> According to the Debian policy all files /etc/default/ must be
> Shellvars-compatible:
>
> "This file should be sourced by the script when the script runs. It
> must contain only variable settings and comments in SUSv3 sh format" [0]
>
> I'm not sure about RedHat systems though.
In theory, that's how it should be there too, but there are a few files
that are not shellvars files; but that can be taken care of with the
more specific filter from sysconfig.aug.
David
More information about the augeas-devel
mailing list