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

Re: Config file management utility

On Tue, 2 Dec 1997, Joe Emenaker wrote:

> Has much discussion been had about a possible configuration file
> management script for the package config scripts to use?
> For example, I installed cron on a Debian box, and then installed mgetty.
> Mgetty placed the following at the end of my /etc/crontab:
>   #-- mgetty begin 
>   20,40 * * * *   root faxrunq
>   #-- mgetty end
> Then, when I updated cron, it asked if I wanted to replace my
> /etc/crontab. I'm assuming that this would have hosed my mgetty settings,
> so I was forced to make the changes to /etc/crontab by hand. 
> So, I was thinking... why not have a utility that the scripts would use to
> make all modifications to config files.... kinda like what mgetty did with
> the "#-- mgetty begin" and "#-- mgetty end"? The only difference is that
> *all* packages (even the package that "owns" a particular config file)
> would be encouraged to use the utility. In the example, cron would use the
> utility to make updates to /etc/crontab, as /etc/crontab would ostensibly
> have "#-- cron begin" and "#-- cron end" statements as well.
> Of course, the utility would have to have command switches to alter what
> comment character to use... whether the file could be deleted if it was
> empty (after removing a section, say)....
> Has this already been discussed and thrown out?

Some time ago, while discussing the install-info utility, that adds or
remove lines to the info/dir file, Ian Jackson proposed to follow the
ideas implemented in the "menu" package.

In a few words: each package provides a little "<config-file>-snippet"
file that goes under a well known directory, and an "update-<config-file>" 
utility rebuilds the config file using all the snippets it finds under
that directory. That way it should be easy to implement an "update-crontab", 
(taking care of not removing lines added by the system administrator).
It would be even better to have a single general tool like:
"update-configfile --file=<config-file-name>" to manage menus, crontabs,
info/dir and similar config files.

Enrique Zanardi						   ezanardi@ull.es
Dpto. Fisica Fundamental y Experimental			Univ. de La Laguna

TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .

Reply to: