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

Bug#92589: there is no standard way to check if an init script is installed



Le 2001-04-02 14:35:06 -0300, Henrique M Holschuh écrivait :
> On Mon, 02 Apr 2001, Jean-Philippe Guérard wrote:
> > However, it does not provide a standard way to check the current
> > status of an init script.
> 
> Please verify if invoke-rc.d --query (initscript) (action) in the accepted
> proposal #76868 is enough for your needs.

invoke-rc.d is a bit different from what I am suggesting. invoke-rc.d
is a level higher than update-rc.d, while check-rc.d is complementary
to update-rc.d.

ie you install a init script with update-rc.d, but you have no way
of knowing which script is installed, and which runlevel it is
installed for.

invoke-rc.d will tell you if the init script is supposed to be run
at the current runlevel.

In other words, update-rc.d and check-rc.d are at the setup
level, while invoke-rc.d is a higher level of abstraction
used to run an init script, or know if it can be runned.

Programs that need this information (e.g. webmin-core, ksysv, rcconf,
etc.) look for information about the complete set up of the init
script : 

+ on which runlevel are these script supposed to be started or
  stopped (ie the full list of runlevel).

+ in which order will they be started or stopped.

They can then display this information in a more visual way.
The administrator can then easily make any necessary changes
to the scripts order, runlevel, etc.

invoke-rc.d (if I understand well) would give them this
information only for the current runlevel, and would need
to be called 2 times to do just that.

check-rc.d should be a very simple script, and provide
efficiently all the necessary information.

Does that seem reasonnable ?

Thanks!

-- 
Jean-Philippe Guérard



Reply to: