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

Tool for adding a piece of text to a configuration file?



Hi,

I'm making a Kerberized version of the amanda package.
In the postinst and postrm scripts I need to add/remove a piece of
text to two configuration files.

I'd like to add a section like

# BEGIN amanda
...
# END amanda

and create the file if it doesn't exist.  The comments will make
removing the section easier.

This seems to be a common thing to want to do, so I expect that a tool
for this already exists.

Can anyone give me a hint?

Best regards,
Mikael Djurfeldt



Reply to: