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

Re: Init.d script, preventing start of one service



On Tue, 11 Nov 2003, Sylvain LE GALL wrote:
> In one of the package i maitain i have a config script which begin by
> asking if the service attached to this package need to be run. I use a
> variable ( stored in /etc/default/mldonkey -- LAUNCH_AT_STARTUP="yes" )
> to determine if i need to run the service or not.
> 
> If the variable is set to yes, the init script launch the service,
> otherwise it does nothing. 
> 
> The user ask me if i can use update-rc.d to create/remove symlink
> depending on the former LAUNCH_AT_STARTUP value.
> 
> What is the standard solution for doing this in debian ?

1. leave update-rc.d alone. Register the init script and be done with it.
2. setup the init script to source /etc/default/mldonkey, and block the
start (return ok status BTW) if LAUNCH_AT_STARTUP is not true.

This is not the best solution, but it is the current best-practice.

> ps : i know ssh use a file to launch or not sshd, is it a good solution
> ?

No.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh



Reply to: