On Wed, Mar 10, 2004 at 01:14:28PM +1100, Tony Green wrote: > I'm editing /etc/system on solaris, I want to ensure that this line is > set : > set shmsys:shminfo_shmmax=4294967296 > > I can use the 'AppendIfNoSuchLine' command and that'll work fine the > first time around. My issue is, what happens the next time I want to > change that line? > > I could switch to the 'ReplaceLineWith' command, but that won't add the > line if it doesn't exist. > > Is there a sensible way around this? I'm guessing I might be missing > something but a couple of dives through the refernce manual turned up > naught.
Not that I have any cfengine experience, but from your description, wouldn't AppendIfNoSuchLine followed by ReplaceLineWith do the job? Creates it if it doesn't exist, and sets it to the right value either way. For new adds, you'll run both, but I don't think the extra processing time is going to be noticeable. Of course, if that's impossible with cfengine I'll just go away and hide. Out of interest, do have any recommendations as to introductory cfengine material? I really should learn how to use it, everyone seems to think it's the world's greatest admin tool. - Matt -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
