[ltt-dev] LSB init chapters (hooking lttng-tools into init scripts)

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Tue Jul 5 18:10:47 EDT 2011


* Anik Mishra (anik.mishra at ericsson.com) wrote:
> As mentioned during the meeting, regarding startup priority, here is the LSB document.
> http://refspecs.linuxfoundation.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html
> 
> Sections 20.2 to 20.8 seem relevant.

The most relevant part is probably 20.3:

http://refspecs.linuxfoundation.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/initscrcomconv.html

"20.3. Comment Conventions for Init Scripts"

<quote>

Provides: boot_facility_1 [boot_facility_2...]

    boot facilities provided by this init script. When an init script is
run with a start argument, the boot facility or facilities specified by
the Provides keyword shall be deemed present and hence init scripts
which require those boot facilities should be started later. When an
init script is run with a stop argument, the boot facilities specified
by the Provides keyword are deemed no longer present. 

Required-Start: boot_facility_1 [boot_facility_2...]

    facilities which must be available during startup of this service.
The init-script system should insure init scripts which provide the
Required-Start facilities are started before starting this script.

Required-Stop: boot_facility_1 [boot_facility_2...]

    facilities which must be available during the shutdown of this
service. The init-script system should avoid stopping init scripts which
provide the Required-Stop facilities until this script is stopped.

[...]
Example:

	### BEGIN INIT INFO
	# Provides: lsb-ourdb
	# Required-Start: $local_fs $network $remote_fs
	# Required-Stop: $local_fs $network $remote_fs
	# Default-Start:  2 3 4 5
	# Default-Stop: 0 1 6
	# Short-Description: start and stop OurDB
	# Description: OurDB is a very fast and reliable database
	#	 engine used for illustrating init scripts
	### END INIT INFO
</quote>

this allows to provide dependencies with the "Required-Start/Stop"
fields. So we could provide the "tracing" facility, and applications
could depend on it.

Any thoughts on how we should integrate this with the lttng-tools git
tree/source packages/distribution binary packaged is welcome.

Thanks,

Mathieu

> 
> Sincerely,
> Anik Mishra
> 

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com




More information about the lttng-dev mailing list