diff options
author | Lee Duncan <lduncan@suse.com> | 2022-03-25 07:54:18 -0700 |
---|---|---|
committer | Lee Duncan <lduncan@suse.com> | 2022-03-25 07:54:18 -0700 |
commit | 9a2d2f2cf391c707a98204d488c3cb3e58cdab00 (patch) | |
tree | b96c83ff4479e16f9032dcabf4435270f2ca6a9d /doc | |
parent | 89df67cd154d43c9b8361880fbd0d94175ff65a1 (diff) | |
download | open-iscsi-9a2d2f2cf391c707a98204d488c3cb3e58cdab00.tar.gz |
Make DB and ISCSIHOME directories configurable.
This commit adds two new top-level build options: one
for the "home" directory for open-iscsi called "HOMEDIR",
and one for the "database" directory, called "DBROOT". One can
now override the defaults of "/etc/iscsi" for either or
both of these directories on the make command line.
The README and man pages are updated with details about
these new options.
Some Makefile cleanup/repair was done as well. Installation
of the initiatorname.iscsi file, was moved out of the top-level
Makefile into the etc subdirectory, and installation of man
ages moved from the top-level Makefile to the doc subdirectory.
Also, this fixes some issues from commit fd14dd8316b1 ("Clean
p Makefile build system."), which incorrectly changed the DESTDIR
ariable in the Makefiles. This current commit also fixes the
top-level variable names for moving DBROOT and HOMEDIR.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/.gitignore | 3 | ||||
-rw-r--r-- | doc/Makefile | 55 | ||||
-rw-r--r-- | doc/iscsi-gen-initiatorname.8.template (renamed from doc/iscsi-gen-initiatorname.8) | 2 | ||||
-rw-r--r-- | doc/iscsiadm.8.template (renamed from doc/iscsiadm.8) | 34 | ||||
-rw-r--r-- | doc/iscsid.8.template (renamed from doc/iscsid.8) | 10 |
5 files changed, 89 insertions, 15 deletions
diff --git a/doc/.gitignore b/doc/.gitignore new file mode 100644 index 0000000..2f32a57 --- /dev/null +++ b/doc/.gitignore @@ -0,0 +1,3 @@ +iscsi-gen-initiatorname.8 +iscsiadm.8 +iscsid.8 diff --git a/doc/Makefile b/doc/Makefile new file mode 100644 index 0000000..7d39dad --- /dev/null +++ b/doc/Makefile @@ -0,0 +1,55 @@ +# This Makefile will work only with GNU make. +# +# Make file for the doc sub-directory +# + +ifeq ($(TOPDIR),) + TOPDIR = .. +endif + +SED = /usr/bin/sed +INSTALL = install + +DESTDIR ?= +etcdir = /etc +DBROOT ?= $(etcdir)/iscsi +HOMEDIR ?= $(etcdir)/iscsi + +prefix ?= /usr +mandir ?= $(prefix)/share/man + +MAN8DIR = $(DESTDIR)$(mandir)/man8 + +MANPAGES_SOURCES = iscsi_discovery.8 \ + iscsi_fw_login.8 \ + iscsi-iname.8 \ + iscsistart.8 +MANPAGES_SOURCES_ISCSIUIO = $(TOPDIR)/iscsiuio/docs/iscsiuio.8 +MANPAGES_TEMPLATES = iscsid.8.template \ + iscsiadm.8.template \ + iscsi-gen-initiatorname.8 +MANPAGES_GENERATED = $(MANPAGES_TEMPLATES:.template=) +MANPAGES_DEST = $(addprefix $(MAN8DIR)/,$(MANPAGES_GENERATED)) \ + $(addprefix $(MAN8DIR)/,$(MANPAGES_SOURCES)) +MANPAGES_DEST_ISCSIUIO = $(addprefix $(MAN8DIR)/,$(notdir $(MANPAGES_SOURCES_ISCSIUIO))) + +all: $(MANPAGES_GENERATED) + +install: install_doc + +install_doc: $(MAN8DIR) $(MANPAGES_DEST) $(MANPAGES_DEST_ISCSIUIO) + +$(MANPAGES_GENERATED): %.8: %.8.template + $(SED) -e 's:@HOMEDIR@:$(HOMEDIR):' -e 's:@DBROOT@:$(DBROOT):' $? > $@ + +$(MANPAGES_DEST): $(MAN8DIR)/%: % + $(INSTALL) -m 644 $? $@ + +$(MANPAGES_DEST_ISCSIUIO): $(MAN8DIR)/%: $(TOPDIR)/iscsiuio/docs/% + $(INSTALL) -m 644 $? $@ + +$(MAN8DIR): + [ -d $@ ] || $(INSTALL) -d $@ + +clean: + $(RM) $(MANPAGES_GENERATED) diff --git a/doc/iscsi-gen-initiatorname.8 b/doc/iscsi-gen-initiatorname.8.template index 5ad0a1e..e10a4ac 100644 --- a/doc/iscsi-gen-initiatorname.8 +++ b/doc/iscsi-gen-initiatorname.8.template @@ -24,7 +24,7 @@ Use \fIIQN-PREFIX\fP as the prefix to the IQN generated, instead of the default of \fBiqn.1996-04.de.suse:01\fP. .SH FILES .TP -/etc/iscsi/initiatorname.iscsi +@HOMEDIR@/initiatorname.iscsi The file containing the initiator name. Do not edit manually. .SH "SEE ALSO" .BR iscsi-iname (8) diff --git a/doc/iscsiadm.8 b/doc/iscsiadm.8.template index 599a8fd..e65a4b0 100644 --- a/doc/iscsiadm.8 +++ b/doc/iscsiadm.8.template @@ -1,4 +1,4 @@ -.TH ISCSIADM 8 "Mar 2021" "" "Linux Administrator's Manual" +.TH ISCSIADM 8 "Mar 2022" "" "Linux Administrator's Manual" .SH NAME iscsiadm \- open-iscsi administration utility .SH SYNOPSIS @@ -174,9 +174,25 @@ For \fIsession\fR mode, a session id (\fIsid\fR) is used. The \fIsid\fR of a ses found by running \fIiscsiadm \-m session \-P 1\fR. The session id and sysfs path are not currently persistent and is partially determined by when the session is setup. +.SH NOTES .PP -Note that many of the \fInode\fR and \fIdiscovery\fR operations require that the iSCSI -daemon (iscsid) be running. +Many of the node and discovery operations require that the iSCSI +daemon (iscsid) be running. If running on a system that uses systemd, +the daemon may start up automatically, if enabled, when needed. +.PP +Open-iscsi has two groups of files it needs to store or get access to, +while running: the \fBHOMEDIR\fR and the \fBDBROOT\fR. The following +describes them: +.TP +.B Home Directory +The \fIhome directory\fR for open-iscsi is @HOMEDIR@. This is +where it keeps it's configuration file (\fIiscsid.conf\fR) and it's +initiator name file (\fIinitiatorname.iscsi\fR). +.TP +.B Database Root Directory +The \fIdatabase root directory\fR for open-iscsi is @DBROOT@. This +is where it keeps its flat database files, such as it's list of \fInode\fRs +(see below). .SH OPTIONS .TP \fB\-a\fR, \fB\-\-ip=\fIipaddr\fP @@ -232,7 +248,7 @@ This option is only valid for \fIping\fR submode. .TP \fB\-I\fR, \fB\-\-interface=\fI[iface]\fR The \fIinterface\fR argument specifies the iSCSI interface to use for the operation. -iSCSI interfaces (\fIiface\fR) are defined in /etc/iscsi/ifaces. For hardware +iSCSI interfaces (\fIiface\fR) are defined in @DBROOT@/ifaces. For hardware iSCSI (e.g. qla4xxx) the \fIiface\fR configuration must have the hardware address (\fIiface.hwaddress\fR = port's MAC address) and the driver/transport_name (\fIiface.transport_name\fR). The \fIiface\fR's name is @@ -326,7 +342,7 @@ If no other options are specified: for \fIdiscovery\fR, \fIdiscoverydb\fR and \fInode\fR mode, all of their respective records are displayed; for \fIsession\fR mode, all active sessions and connections are displayed; for \fIfw\fR mode, all boot firmware values are displayed; for \fIhost\fR mode, all iSCSI hosts are displayed; -and for \fIiface\fR mode, all interfaces setup in /etc/iscsi/ifaces are displayed. +and for \fIiface\fR mode, all interfaces setup in @DBROOT@/ifaces are displayed. .TP \fB\-n\fR, \fB\-\-name=\fIname\fR In \fInode\fR mode, specify a field \fIname\fR in a record. In \fIflashnode\fR submode @@ -680,17 +696,17 @@ Display all data for a given node record: \fBsh#\fR iscsiadm \-\-mode node \-\-targetname iqn.2001-05.com.doe:test \-\-portal 192.168.1.1:3260 .SH FILES .TP -/etc/iscsi/iscsid.conf +@HOMEDIR@/iscsid.conf The configuration file read by \fBiscsid\fR and \fBiscsiadm\fR on startup. .TP -/etc/iscsi/initiatorname.iscsi +@HOMEDIR@/initiatorname.iscsi The file containing the iSCSI InitiatorName and InitiatorAlias read by \fBiscsid\fR and \fBiscsiadm\fR on startup. .TP -/etc/iscsi/nodes/ +@DBROOT@/nodes/ This directory contains the nodes with their targets. .TP -/etc/iscsi/send_targets +@DBROOT@/send_targets This directory contains the portals. .SH "SEE ALSO" .BR iscsid (8) diff --git a/doc/iscsid.8 b/doc/iscsid.8.template index db996b4..0d122a0 100644 --- a/doc/iscsid.8 +++ b/doc/iscsid.8.template @@ -15,11 +15,11 @@ iSCSI database. .TP .BI [-c|--config=]\fIconfig\-file\fP Read configuration from \fIconfig\-file\fR rather than the default -\fI/etc/iscsi/iscsid.conf\fR file. +\fI@HOMEDIR@/iscsid.conf\fR file. .TP .BI [-i|--initiatorname=]\fIiname\-file\fP Read initiator name from \fIiname\-file\fR rather than the default -\fI/etc/iscsi/initiatorname.iscsi\fR file. +\fI@HOMEDIR@/initiatorname.iscsi\fR file. .TP .BI [-f|--foreground] run @@ -55,14 +55,14 @@ display version and exit. .SH FILES .TP -/etc/iscsi/iscsid.conf +@HOMEDIR@/iscsid.conf The configuration file read by .B iscsid and .B iscsiadm on startup. .TP -/etc/iscsi/initiatorname.iscsi +@HOMEDIR@/initiatorname.iscsi The file containing the iSCSI initiatorname and initiatoralias read by .B iscsid @@ -70,7 +70,7 @@ and .B iscsiadm on startup. .TP -/etc/iscsi/nodes +@DBROOT@/nodes Open-iSCSI persistent configuration database .SH "SEE ALSO" |