[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#89762: Configuration::ReadConfigFile doesn't behave as documented

On Thu, 15 Mar 2001, Adam Heath wrote:

> > > from bind working, yet the output shows they don't.  You also say that apt
> > > can parse most named.conf files, when I maintain it can parse hardly any
> > > of them(they all have zone entries).
> Ok, time for bluntness.

How about: You... Cannot.. Read.. C...

>>> import apt_pkg
>>> Cnf = apt_pkg.newConfiguration()
>>> apt_pkg.ReadConfigFileISC(Cnf,"/etc/bind/named.conf");
>>> print Cnf.keys()
['options', 'options::directory', 'logging', 'logging::category',
'logging::category::lame-servers', 'logging::category::lame-servers::',
'logging::category::cname', 'logging::category::cname::', 'zone',
'zone::.', 'zone::.::type', 'zone::.::file', 'zone::localhost',
'zone::localhost::type', 'zone::localhost::file',
'zone::127.in-addr.arpa', 'zone::127.in-addr.arpa::type',
'zone::127.in-addr.arpa::file', 'zone::0.in-addr.arpa',
'zone::0.in-addr.arpa::type', 'zone::0.in-addr.arpa::file',
'zone::255.in-addr.arpa', 'zone::255.in-addr.arpa::type',
'zone::255.in-addr.arpa::file', 'include']
>>> print Cnf["zone::localhost::file"] 

I'll leave it as an excerise for the reader to determine why the above
result is different from apt-config -c /etc/bind/named.conf.

Hint: It has to do with my last message and the 'AsSectional' flag :P


Reply to: