diff --git a/Makefile.am b/Makefile.am index 1797ddf..986b789 100644 --- a/Makefile.am +++ b/Makefile.am @@ -6,6 +6,10 @@ AM_CPPFLAGS=-I. -I$(srcdir)/include "-D_U_=__attribute__((unused))" \ "-D_R_(A,B)=__attribute__((format(printf,A,B)))" AM_CFLAGS=$(WARN_CFLAGS) LDADD = lib/libiscsi.la -lpopt +XSLTPROC = /usr/bin/xsltproc + +# Manpages +man1_MANS = doc/iscsi-ls.1 EXTRA_DIST = autogen.sh COPYING LICENCE-GPL-2.txt LICENCE-LGPL-2.1.txt \ packaging/RPM/libiscsi.spec.in packaging/RPM/makerpms.sh @@ -320,3 +324,6 @@ bin_SCRIPTS = bin/ld_iscsi.so bin/ld_iscsi.so: bin/ld_iscsi.o $(CC) -shared -o bin/ld_iscsi.so bin/ld_iscsi.o -ldl endif + +doc/iscsi-ls.1: doc/iscsi-ls.1.xml + -test -z "$(XSLTPROC)" || $(XSLTPROC) -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< diff --git a/doc/iscsi-ls.1.xml b/doc/iscsi-ls.1.xml new file mode 100644 index 0000000..5936a98 --- /dev/null +++ b/doc/iscsi-ls.1.xml @@ -0,0 +1,139 @@ + + + + + + iscsi-ls + 1 + iscsi-ls + iscsi-ls: list iSCSI targets and LUNs + + + + + iscsi-ls + Utility to list iSCSI targets and LUNs + + + + + iscsi-ls [ OPTIONS ] <ISCSI-PORTAL> + + + + iscsi-ls + -i --initiator-name=<IQN> + -s --show-luns + -d --debug=<INTEGER> + -? --help + --usage + + + + + DESCRIPTION + + iscsi-ls is a utility to list all targets and LUNs for an iSCSI portal. + + + + ISCSI PORTAL URL FORMAT + + iSCSI portal format is 'iscsi://[<username>[%<password>]@]<host>[:<port>]' + + + + Username and password are only required if the target requires CHAP + authentication. Optionally you can specify the username and password via + the environment variables LIBISCSI_CHAP_USERNAME and + LIBISCSI_CHAP_PASSWORD. + + + + Host can be specified either as a hostname, an IPv4 address or an + IPv6 address. + + Examples: + + iscsi://192.0.2.1 + iscsi://[2001:DB8::1]:3261 + iscsi://ronnie%password@iscsi.example.com + + + + + Port is the TCP port on the target to connect to. Default is 3260. + + + + + OPTIONS + + + + -i --initiator-name=<IQN> + + + This specifies the initiator-name that iscsi-ls will use when + logging in to the target. + + + The default name is + 'iqn.2007-10.com.github:sahlberg:libiscsi:iscsi-ls' but you can use + this argument to override this. This is mainly needed for cases + where the target is configured with access-control to only + allow discovery logins from known initiator-names. + + + + + -s --show-luns + + + In addition to listing all the targets at the specified portal + also list all the LUNs and their types on each discovered target. + + + In order to display the type of LUN iscsi-ls need to be able to + perform a normal login on the targets. If the target is using + access-control you will need to specify an initiator-name + that allows normal logins to the target. + + + + + -d --debug=<INTEGER> + + + Debug level. + + + + + -? --help + + + Display basic help text. + + + + + --usage + + + Display basic usage text. + + + + + + + + SEE ALSO + + iscsi-inq(1) + + + + +