[PATCH 1/1] Add a manpage for TGTD in XSLT format and makefile changes to build it.

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

 



List,

Please find attached a small patch that adds initial documentation in
XSLT format for tgtd.

This file is, if xsltproc is present, used to generate both a manpage
and a html page for tgtd.




regards
ronnie sahlberg
From b518519f1fc6019a1c3dfa4df2b1b566bd3d8210 Mon Sep 17 00:00:00 2001
From: Ronnie Sahlberg <ronniesahlberg@xxxxxxxxx>
Date: Wed, 17 Feb 2010 11:07:20 +1100
Subject: [PATCH] Add documentation about the tgtd daemon in XSLT format.

If xsltproc is available, use this tool to compile this XSLT file into both a manpage and a html page for tgtd.

Add a directory doc/htmlpages to store html versions of manpages.
These could go to /usr/share/doc/tgt ?

Check in both generated file, man and html, so that they are still available on systems where xsltproc is not available to build them.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@xxxxxxxxx>
---
 doc/Makefile              |   17 ++++++-
 doc/htmlpages/tgtd.8.html |   40 +++++++++++++++
 doc/manpages/tgtd.8       |   81 +++++++++++++++++++++++++++++
 doc/tgtd.8.xml            |  123 +++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 260 insertions(+), 1 deletions(-)
 create mode 100644 doc/htmlpages/tgtd.8.html
 create mode 100644 doc/manpages/tgtd.8
 create mode 100644 doc/tgtd.8.xml

diff --git a/doc/Makefile b/doc/Makefile
index f7cdfd3..77b6f87 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -2,10 +2,15 @@ mandir ?= $(PREFIX)/share/man
 docdir ?= $(PREFIX)/share/doc/tgt
 
 MANPAGES = manpages/tgtadm.8 manpages/tgt-admin.8 \
-		manpages/tgt-setup-lun.8
+		manpages/tgt-setup-lun.8 manpages/tgtd.8
+
 DOCS = README.fcoe README.ibmvstgt README.iscsi README.iser \
 	    README.lu_configuration README.mmc tmf.txt
 
+XSLTPROC = /usr/bin/xsltproc
+XMLMAN = manpages/tgtd.8
+XMLHTML = htmlpages/tgtd.8.html
+
 .PHONY:all
 all:
 
@@ -19,3 +24,13 @@ install: $(MANPAGES) $(DOCS)
 .PHONY: clean
 clean:
 
+manpages/tgtd.8: tgtd.8.xml
+	-test -z "$(XSLTPROC)" || $(XSLTPROC) -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
+
+htmlpages/tgtd.8.html: tgtd.8.xml
+	-test -z "$(XSLTPROC)" || $(XSLTPROC) -o $@ http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $<
+	
+xmlman: $(XMLMAN)
+
+xmlhtml: $(XMLHTML)
+
diff --git a/doc/htmlpages/tgtd.8.html b/doc/htmlpages/tgtd.8.html
new file mode 100644
index 0000000..3e93d42
--- /dev/null
+++ b/doc/htmlpages/tgtd.8.html
@@ -0,0 +1,40 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>tgtd</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en"><a name="tgtd.1"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>tgtd &#8212; The SCSI Target Daemon</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">tgtd</code> </p></div><div class="cmdsynopsis"><p><code class="command">tgtd</code>  [-d --debug &lt;INTEGER&gt;] [-f --foregound] [-h --help] [--iscsi &lt;...&gt;]</p></div></div><div class="refsect1" lang="en"><a name="id2478224"></a><h2>DESCRIPTION</h2><p>
+      Tgtd is a SCSI Target daemon. It can be used to provide iSCSI target
+      service to a network.
+    </p></div><div class="refsect1" lang="en"><a name="id2478234"></a><h2>OPTIONS</h2><div class="variablelist"><dl><dt><span class="term">-d --debug &lt;INTEGER&gt;</span></dt><dd><p>
+            Set to non-zero value to activate additional debugging messages to
+	    be logged.
+          </p></dd><dt><span class="term">-f --foreground</span></dt><dd><p>
+            Run the daemon in the foreground.
+          </p></dd><dt><span class="term">-h --help</span></dt><dd><p>
+            Print help text to the screen.
+          </p></dd><dt><span class="term">--iscsi &lt;...&gt;</span></dt><dd><p>
+	    ISCSI specific options.
+            See the ISCSI section below for options specific to this frontend.
+          </p></dd></dl></div></div><div class="refsect1" lang="en"><a name="id2479432"></a><h2>ISCSI options</h2><p>
+      These parameters apply only to the iSCSI frontend.
+    </p><div class="refsect2" lang="en"><a name="id2479441"></a><h3>portal=&lt;ip-address[:port]&gt;</h3><p>
+	This option is used to bind tgtd to a specific ip-address/portal and/or
+	port. By default tgtd will bind to port 3260 on the wildcard address.
+      </p><p>
+      Example: to bind tgtd to a specific address and port
+      </p><pre class="screen">
+	tgtd --iscsi portal=192.0.2.1:3260
+      </pre><p>
+      </p></div></div><div class="refsect1" lang="en"><a name="id2479466"></a><h2>SEE ALSO</h2><p>
+      tgtadm(8), tgt-admin(8), tgt-setup-lun(8).
+      <a class="ulink" href="http://stgt.sourceforge.net/"; target="_top">http://stgt.sourceforge.net/</a>
+    </p></div><div class="refsect1" lang="en"><a name="id2479480"></a><h2>COPYRIGHT/LICENSE</h2><div class="literallayout"><p><br>
+This program is free software; you can redistribute it and/or modify<br>
+it under the terms of the GNU General Public License as published by<br>
+the Free Software Foundation; either version 2 of the License, or (at<br>
+your option) any later version.<br>
+<br>
+This program is distributed in the hope that it will be useful, but<br>
+WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU<br>
+General Public License for more details.<br>
+<br>
+You should have received a copy of the GNU General Public License<br>
+along with this program; if not, see http://www.gnu.org/licenses/.<br>
+</p></div></div></div></body></html>
diff --git a/doc/manpages/tgtd.8 b/doc/manpages/tgtd.8
new file mode 100644
index 0000000..a7100bc
--- /dev/null
+++ b/doc/manpages/tgtd.8
@@ -0,0 +1,81 @@
+.\"     Title: tgtd
+.\"    Author: 
+.\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
+.\"      Date: 02/17/2010
+.\"    Manual: 
+.\"    Source: 
+.\"
+.TH "TGTD" "8" "02/17/2010" "" ""
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.SH "NAME"
+tgtd - The SCSI Target Daemon
+.SH "SYNOPSIS"
+.HP 5
+\fBtgtd\fR
+.HP 5
+\fBtgtd\fR [\-d\ \-\-debug\ <INTEGER>] [\-f\ \-\-foregound] [\-h\ \-\-help] [\-\-iscsi\ <\.\.\.>]
+.SH "DESCRIPTION"
+.PP
+Tgtd is a SCSI Target daemon\. It can be used to provide iSCSI target service to a network\.
+.SH "OPTIONS"
+.PP
+\-d \-\-debug <INTEGER>
+.RS 4
+Set to non\-zero value to activate additional debugging messages to be logged\.
+.RE
+.PP
+\-f \-\-foreground
+.RS 4
+Run the daemon in the foreground\.
+.RE
+.PP
+\-h \-\-help
+.RS 4
+Print help text to the screen\.
+.RE
+.PP
+\-\-iscsi <\.\.\.>
+.RS 4
+ISCSI specific options\. See the ISCSI section below for options specific to this frontend\.
+.RE
+.SH "ISCSI OPTIONS"
+.PP
+These parameters apply only to the iSCSI frontend\.
+.SS "portal=<ip\-address[:port]>"
+.PP
+This option is used to bind tgtd to a specific ip\-address/portal and/or port\. By default tgtd will bind to port 3260 on the wildcard address\.
+.PP
+Example: to bind tgtd to a specific address and port
+.sp
+.RS 4
+.nf
+	tgtd \-\-iscsi portal=192\.0\.2\.1:3260
+      
+.fi
+.RE
+.sp
+.SH "SEE ALSO"
+.PP
+tgtadm(8), tgt\-admin(8), tgt\-setup\-lun(8)\.
+\fI\%http://stgt.sourceforge.net/\fR
+.SH "COPYRIGHT/LICENSE"
+.sp
+.RS 4
+.nf
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at
+your option) any later version\.
+
+This program is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE\.  See the GNU
+General Public License for more details\.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, see http://www\.gnu\.org/licenses/\.
+.fi
+.RE
diff --git a/doc/tgtd.8.xml b/doc/tgtd.8.xml
new file mode 100644
index 0000000..9200c46
--- /dev/null
+++ b/doc/tgtd.8.xml
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE refentry PUBLIC "-//Samba-Team//DTD DocBook V4.2-Based Variant V1.0//EN" "http://www.samba.org/samba/DTD/samba-doc";>
+<refentry id="tgtd.8">
+
+<refmeta>
+	<refentrytitle>tgtd</refentrytitle>
+	<manvolnum>8</manvolnum>
+</refmeta>
+
+
+<refnamediv>
+	<refname>tgtd</refname>
+	<refpurpose>The SCSI Target Daemon</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+	<cmdsynopsis>
+		<command>tgtd</command>
+	</cmdsynopsis>
+	
+	<cmdsynopsis>
+		<command>tgtd</command>
+		<arg choice="opt">-d --debug &lt;INTEGER&gt;</arg>
+		<arg choice="opt">-f --foregound</arg>
+		<arg choice="opt">-h --help</arg>
+		<arg choice="opt">--iscsi &lt;...&gt;</arg>
+	</cmdsynopsis>
+	
+</refsynopsisdiv>
+
+  <refsect1><title>DESCRIPTION</title>
+    <para>
+      Tgtd is a SCSI Target daemon. It can be used to provide iSCSI target
+      service to a network.
+    </para>
+  </refsect1>
+
+
+  <refsect1>
+    <title>OPTIONS</title>
+
+    <variablelist>
+      <varlistentry><term>-d --debug &lt;INTEGER&gt;</term>
+        <listitem>
+          <para>
+            Set to non-zero value to activate additional debugging messages to
+	    be logged.
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry><term>-f --foreground</term>
+        <listitem>
+          <para>
+            Run the daemon in the foreground.
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry><term>-h --help</term>
+        <listitem>
+          <para>
+            Print help text to the screen.
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry><term>--iscsi &lt;...&gt;</term>
+        <listitem>
+          <para>
+	    ISCSI specific options.
+            See the ISCSI section below for options specific to this frontend.
+          </para>
+        </listitem>
+      </varlistentry>
+    </variablelist>
+  </refsect1>
+
+
+  <refsect1><title>ISCSI options</title>
+    <para>
+      These parameters apply only to the iSCSI frontend.
+    </para>
+
+    <refsect2><title>portal=&lt;ip-address[:port]&gt;</title>
+      <para>
+	This option is used to bind tgtd to a specific ip-address/portal and/or
+	port. By default tgtd will bind to port 3260 on the wildcard address.
+      </para>
+      <para>
+      Example: to bind tgtd to a specific address and port
+      <screen format="linespecific">
+	tgtd --iscsi portal=192.0.2.1:3260
+      </screen>
+      </para>
+    </refsect2>
+  </refsect1>
+
+
+  <refsect1><title>SEE ALSO</title>
+    <para>
+      tgtadm(8), tgt-admin(8), tgt-setup-lun(8).
+      <ulink url="http://stgt.sourceforge.net/"/>
+    </para>
+  </refsect1>
+
+  <refsect1><title>COPYRIGHT/LICENSE</title>
+<literallayout>
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at
+your option) any later version.
+
+This program is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, see http://www.gnu.org/licenses/.
+</literallayout>
+  </refsect1>
+</refentry>
-- 
1.5.4.3

Attachment: 0001-Add-documentation-about-the-tgtd-daemon-in-XSLT-form.patch.gz
Description: GNU Zip compressed data


[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux