lkml.org 
[lkml]   [2005]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Universal method to start a script at boot
Denis Vlasenko wrote:

>On Monday 12 September 2005 07:17, Michael Clark wrote:
>
>
>>>>Is there a standard way to start a script or program at boot that will work
>>>>on any Linux kernel/distro no matter which init system is being used or how it
>>>>has been configured? Probably not, but I thought someone here could possibly
>>>>answer this.
>>>>
>>>>
>>You could use the LSB conforming method of writing and installing
>>an init script:
>>
>>http://refspecs.freestandards.org/LSB_3.0.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html
>>http://refspecs.freestandards.org/LSB_3.0.0/LSB-Core-generic/LSB-Core-generic/iniscrptfunc.html
>>http://refspecs.freestandards.org/LSB_3.0.0/LSB-Core-generic/LSB-Core-generic/initscrcomconv.html
>>http://refspecs.freestandards.org/LSB_3.0.0/LSB-Core-generic/LSB-Core-generic/initsrcinstrm.html
>>
>>
>
>Awful. This codifies ages-old Unix traditional SysV-like init
>and its derivatives, which should be get rid of instead.
>
>
>
Actually if you look closer it is a bit smarter than sysvinit and
includes latent functionality that the distros will eventually pick up
on to increase boot speed and allow parallel starting of services (it
codifies boot dependencies with provides and requires - not just boot
order like svsvinit).

http://refspecs.freestandards.org/LSB_3.0.0/LSB-Core-generic/LSB-Core-generic/initscrcomconv.html


For example an extract from /etc/init.d/vmware

# Basic support for the Linux Standard Base Specification 1.3
# Used by insserv and other LSB compliant tools.
### BEGIN INIT INFO
# Provides: VMware
# Required-Start: $network $syslog
# Required-Stop:
# Default-Start: 2 3 5
# Default-Stop: 0 6
# Short-Description: Manages the services needed to run VMware software
# Description: Manages the services needed to run VMware software
### END INIT INFO

And whether you think it is awful or not - it is the closest thing we
have to universal in Linux land (which is what the original poster was
asking) ie. all of the major distros are aiming for LSB conformance.

~mc
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-09-12 13:26    [W:0.045 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site