[Top][All Lists]

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

RE: Modular configuration bundles (was: Re: shellcommand return-v alue d

From: Andrews, Martin
Subject: RE: Modular configuration bundles (was: Re: shellcommand return-v alue defines)
Date: Fri, 22 Sep 2000 14:57:42 -0400

I am confused by this example of ssh and ftp. How would you handle the merge
of the two inetd.conf files? I use editfiles instead. Or, in cases where I
want an absolute definition of the file - like I do for /etc/aliases - I
copy all the pieces I want to a directory and have a little script
concatenate them whenever one of the files changes.

Also, if sshd and ftpd are started by inetd, then no restart is needed
(except for reloading inetd). I handle this situation by having each inet
based service do something like:

    { /etc/inetd.conf
        BeginGroupIfNoSuchLine "$(rsync_inet)"
            DeleteLinesMatching "^rsync .*"
            Append "$(rsync_inet)"
        DefineClasses inet_updated

And then in the inet section I could restart the inet server based on the
inet_updated class... but I don't. I wrote service management script in perl
that verifies that a service is started, and reload or restarts it if any of
its defined configuration files have changed (using info stored in
init-script headers like redhat linux does).


> My current problem is figuring out how to implement
> check_for_changes_in_configuration such that I can define
> NISServer_needs_reloading if its file has changed. 
> The apparent way would be to use a copyfiles action on the specific
> file -- /var/yp/securenets -- and define NISServer_needs_reloading if
> it's copied. This might work for NIS, but it won't always work where
> multiple groups use the same file.
> Consider an example: both SSHServer and FTPServer modify 
> /etc/inetd.conf.
> If we have in the SSHServer bundle
>       copy: install_configuration.SSHServer:: 
>               $(work_directory)/etc/inetd.conf dest=/etc/inetd.conf
>               define=SSHServer_needs_reloading
> and also, in the FTPServer bundle
>       copy: install_configuration.FTPServer::
>               $(work_directory)/etc/inetd.conf dest=/etc/inetd.conf
>               define=FTPServer_needs_reloading
> then we have a race condition. When the /etc/inetd.conf changes, BOTH
>       SSHServer_needs_reloading
> and
>       FTPServer_needs_reloading
> should be defined, so that the appropriate reloads can be done. When
>       copy:install_configuration.SSHServer
> copies the file first, it will define SSHServer_needs_reloading. Then
>       copy:install_configuration.FTPServer
> will not be able to detect that the configuration file has changed,
> because $(work_directory)/etc/inetd.conf is the same as 
> /etc/inetd.conf
> Feh. :(
> _______________________________________________
> Help-cfengine mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]