On 11/26/2011 05:06 PM, Wayne Blaszczyk wrote:
>
> I had another look. I'm still confused about the INIT INFO section.
> Namely, the
> # Provides:
> # Required-Start:
> # Should-Start:
> # Required-Stop:
> # Should-Stop:
> Are these comments only, or do they actually do something? Some have $
> signs (variables?), and others don't. In the above example you have
> 'Provides: $svnserve', I don't see the connection between svn and mysql.
> Is there some documentation on how to write up these 'new' bootscripts.
> Wayne.
Yes, it is all in the LSB 4.1 specification. Unfortunately,
linux-foundation.org seems to be down right now, but here is a copy of
the reserved facility names mentioned in the 4.0 spec (they should not
have changed in 4.1):
===================================================
20.6 Facility Names
Boot facilities are used to indicate dependencies in initialization
scripts, as de
fined in Comment Conventions for Init Scripts. Facility names are
assigned to
scripts by the Provides: keyword. Facility names that begin with a
dollar sign
('$') are reserved system facility names.
Note: Facility names are only recognized in the context of the init
script comment
block and are not available in the body of the init script. In
particular, the use of the
leading '$' character does not imply system facility names are subject
to shell variable
expansion, since they appear inside comments.
Conforming applications shall not provide facilities that
begin with a dollar
sign. Implementations shall provide the following facility names:
$local_fs: all local file systems are mounted
$network: basic networking support is available. Example: a server
program could
listen on a socket.
$named: IP nametoaddress translation, using the interfaces
described in this
specification, are available to the level the system normally provides
them.
Example: if a DNS query daemon normally provides this facility, then that
daemon has been started.
$portmap: daemons providing SunRPC/ONCRPC portmapping service as defined in
RFC 1833: Binding Protocols for ONC RPC Version 2 (if
present) are
running.
$remote_fs: all remote file systems are available. In some
configurations, file systems
such as /usr may be remote. Many applications that require $local_fs will
probably also require $remote_fs.
$syslog: system logger is operational.
$time: the system time has been set, for example by using a
networkbased time
program such as ntp or rdate, or via the hardware Real Time Clock.
Other (nonsystem) facilities may be defined by other conforming
applications.
These facilities shall be named using the same conventions defined for
naming
init scripts (see Script Names). Commonly, the facility provided by a
conform
ing init script will have the same name as the name assigned to the init
script.
======================================================
Names for other scripts are maintained at LANANA, but common sense will
likely yield a valid facility name that is already in the registry with
the "Reserved for LSB-Compliant Distributions" tag. The list is
available here: http://www.lanana.org/lsbreg/init/init.txt although I
now find that "apache" is there as well as "httpd" which didn't used to
be the case. Personally, I'd prefer to be as unambiguous as possible in
cases like above. IOW don't use a vendor name because that vendor might
provide other services.
As far as the spec is concerned, I wasn't able to find a copy of 4.1,
but here is a copy of 4.0:
http://www.ludism.org/~rwhe/LSB/pdf/LSB-Core-generic-try01.pdf
Really the only significant change between 4.0 and 4.1 is the addition
of the xdg specs as required instead of recommended.
HTH
-- DJ Lucas
--
This message has been scanned for viruses and
dangerous content, and is believed to be clean.
--
http://linuxfromscratch.org/mailman/listinfo/blfs-book
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page