<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
<!ENTITY author-sect                  SYSTEM "author-sect.xml">
<!ENTITY bugs-sect                    SYSTEM "bugs-sect.xml">
]>
<refentry status="draft" id="lsb2rdf">

<refentryinfo>
<!--  <date>2002-05-23</date> -->
<author>
<firstname>Leni</firstname>
<surname>Mayo</surname>
</author>
</refentryinfo>

<refmeta>
<refentrytitle><application>lsb2rdf</application></refentrytitle>
<manvolnum>1</manvolnum>
<refmiscinfo>lsb2rdf 0.3.2</refmiscinfo>
</refmeta>

<refnamediv>
<refname><application>lsb2rdf</application></refname>

<refpurpose>parse boot scripts for special-purpose comments, generating xml/rdf output</refpurpose>
</refnamediv>

<refsynopsisdiv>
<cmdsynopsis>
<command>lsb2rdf</command>
<arg choice="req" rep="repeat"><replaceable>file</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>

<refsect1>
<title>DESCRIPTION</title>

<para>
<command>lsb2rdf</command> parses files looking for special-purpose sh-style comments.
An xml/rdf document is generated and sent to standard output.  The document is a
collection of rdf statements describing services, dependencies and other meta-data associated with each 
<replaceable>file</replaceable>.
</para>
<para>
The serel daemon <command>sereld</command> uses collections of
<command>lsb2rdf</command>-generated xml/rdf documents 
in responding to <command>serelhistory</command> queries.
</para>
<para>
For the syntax expected of the boot script comments, see the STANDARDS selection below.
</para>
</refsect1>

<refsect1>
<title>STANDARDS</title>
<para>
Linux Standard Base Specification,
Section 19. System Initialization,
Comment conventions for init scripts,
<ulink url="http://www.linuxbase.org/spec/refspecs/LSB_1.1.0/gLSB/initscrcomconv.html"></ulink>
</para>
</refsect1>

<refsect1>
<title>EXIT STATUS</title>
<para>
0 if all files were parsed without error, 1 otherwise.
</para>
</refsect1>

<refsect1>
<title>EXAMPLE</title>
<example>
<title>lsb2rdf parsing the sendmail boot script</title>
<para>
The sendmail boot script: eg, <filename class="symlink">/etc/rc.d/rc3.d/S80sendmail</filename>
<programlisting>
# This script starts sendmail
### BEGIN INIT INFO
# Provides: sendmail
# Required-Start: network syslog
### END INIT INFO
#
# ... start and stop sendmail
</programlisting>
</para>
<para>
<userinput>
<command>lsb2rdf</command> <filename class="symlink">/etc/rc.d/rc3.d/S80sendmail</filename>
</userinput>
</para>
<para>
generates the following output:
</para>
<para>
<screen>
&lt;?xml version="1.0" encoding="utf-8"?&gt;
<![CDATA[ 
<rdf:RDF
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:serel="http://www.fastboot.org/2002/03/serel-schema#"
  xmlns:graph="http://www.fastboot.org/2002/03/graph-schema#"
  xmlns="http://www.fastboot.org/2002/03/graph-schema#"
>

<service rdf:ID="sendmail">
  <edges>
    <rdf:Seq>
      <rdf:li rdf:resource="#edge-network-sendmail" />
      <rdf:li rdf:resource="#edge-syslog-sendmail" />
    </rdf:Seq>
  </edges>
</service>

<edge rdf:ID="edge-network-sendmail" >
  <source rdf:resource="#network" />
  <target rdf:resource="#sendmail" />
</edge>
<edge rdf:ID="edge-syslog-sendmail" >
  <source rdf:resource="#syslog" />
  <target rdf:resource="#sendmail" />
</edge>

</rdf:RDF>
]]>
</screen>
</para>
</example>

</refsect1>

&bugs-sect;

<refsect1>
<title>SEE ALSO</title>
<para>
<command>sereld (8)</command>, <command>serelhistory (8)</command>
</para>
</refsect1>

&author-sect;

</refentry>
