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

Re: Policy for init.d scripts is not LSB compilant



David Pashley wrote:
> I would like to suggest the following changes to Policy to make it more
> in line with LSB 1.1. Most text is taken from:

If you want this to happen you should submit a proposal bug report so it
doesn't get lost. Policy is frozen for woody right now.

> 	Each LSB-compliant init.d script must source the file
> 	/lib/lsb/init-functions. This file must cause the following shell
> 	script commands to be defined. This can be done either by adding a
> 	directory to the PATH variable which defines these commands, or by
> 	defining sh aliases. While the distribution-provided aliases may
> 	choose to use bash extensions (at the distribution's option), the 	LSB
> init.d files themselves should only depend in /bin/sh features 	as
> defined by POSIX.2.
> 
> 		start_daemon [-f] [-n nicelevel] pathname [args]

I can see no reason why we would want debian init.d scripts to adopt
this red-hat like mess. To support the lsb we have to make
/lib/lsb/init-functions available in a lsb package, but that doesn't
mean we have to use it.

> 		log_success_msg "message"
> 
> 	This requests the distribution to print a success message. The 	message
> should be relatively short; no More than 60 characters is 	highly
> desirable.
> 
> 		log_failure_msg "message"
> 	
> 	This requests the distribution to print a failure message. The 	message
> should be relatively short; no more than 60 characters is 	highly
> desirable.
> 
> 		log_warning_msg "message"
> 
> 	This requests the distribution to print a warning message. The 	message
> should be relatively short; no more than 60 characters is 	highly
> desirable.

Something like this used throughout debian init script would go a long
way toward allowing for drop-in replacements that change how the bootup
sequence looks (colored lights, graphics, whatever cruft people are
hankering for). But it would be much more consistent with how init
scripts have always worked in Debian if these three commands were
standalone programs like start-stop-daemon. Also, to support the current
Debian scheme, simply logging success, failure, or warning is not
enough; there needs to be a command that logs the name of the service
that is starting (currently done with echo -n "Starting Foo Daemon: ").

-- 
see shy jo



Reply to: