Re: [Setup-tool-hackers] runlevel



On Tue, 2003-06-03 at 02:42, Carlos Garnacho Parro wrote:
> it could be great, but the only problem is that there are distros that use
> the sysV init system and doesn't have the chkconfig lines in the scripts,
> so we should have sysV funcions and sysV_chkconfig functions (that's not a
> great problem itself, it's doable). In the same way, a user can compile a
> new service that doesn't include the chkconfig line, so IMHO we can't rely
> on the distro to choose one of the sysV function sets. It's just the most
> generic way... any idea to do this?
> 
> I'd love to remove the priority concept, and rely in things like chkconfig
> to do such stuff, but it's not always possible :-(
> 

I did some thinking.
I think you are right that chkconfig should be avoided - but I think it
should be emulated, so to speak.

Whether it be chkconfig or some other configuration method - every *nix
that has configurations for init scripts are going to basically have a
kill number, start number, and what run levels it starts in.

If configurations for this exist they should be honored to be consistent
with the flavor of *nix.

I think the way to do this is to have a default S value of 99 and a
default K value of 1. If a configuration for the init script can be
found, those default values get replaced by the configuration.

When adding a service that has not been configured to run before - the
default start level(s) should be whatever is set in
gst_service_sysv_get_runlevels - plus the current runlevel (if it isn't
one of those). If a configuration for the init script is found, the
default start levels are whatever is in that configuration (plus
current). The kill levels would be whatever isn't a start level.

Finally - whatever is used when the user commits the change (start
priority, kill priority, start levels, kill levels) should, I think,
replace any existing configuration (or create a configuration if the
init script doesn't have one).

The default could be to assume chkconfig style configuration if the *nix
doesn't have one - since chkconfig is just a comment in the init script.

There would need to be interface changes.
The "service properties" needs to allow for both a start priority and a
stop priority.

But I think the rest of the interface is probably be OK. 

_______________________________________________
setup-tool-hackers maillist  -  setup-tool-hackers@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/setup-tool-hackers



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