Ask Your Question
0

How to update /etc/nscd.conf using augeas

asked 2015-11-24 00:17:44 -0500

rgv gravatar image

updated 2015-11-24 11:13:48 -0500

Hi,

I have a requirement to update entry in /etc/nscd.conf, is it possible to do it with augeas? if so how can i update the below entry?

enable-cache hosts no

augeas { '/etc/nscd.conf':
incl    =>  "/etc/nscd.conf",
changes =>  "what should be here???",
notify  =>  Service[ "nscd"],
}

When i use augtool to get the available nodes i dont see etc/nscd.conf so that means augeas doesn't support etc/nscd.conf by default ?

Thanks

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-11-24 19:43:45 -0500

GregLarkin gravatar image

I don't see any stock Augeas lenses to handle the /etc/nscd.conf format, although it looks pretty simple - comment lines and non-comment lines with 3 space-delimited tokens.

It seems like it should be pretty easy to take the existing inifile.aug base lens and create a custom lens to parse the nscd.conf file. However, "easy" is a relative term. :)

There is some help here (http://augeas.net/docs/writing-schemas.html), but it will still take some doing. I imagine that if you succeed in building a lens for that file, the Augeas team would welcome the contribution back to the product.

edit flag offensive delete link more

Comments

Thank you Greg!! i will try

rgv gravatar imagergv ( 2015-11-25 13:17:00 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-11-24 00:17:44 -0500

Seen: 121 times

Last updated: Nov 24 '15