Source-Changes-HG archive

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

[src/trunk]: src/etc Add distribution entries and supporting files for the iS...



details:   https://anonhg.NetBSD.org/src/rev/a4545b51990a
branches:  trunk
changeset: 588124:a4545b51990a
user:      agc <agc%NetBSD.org@localhost>
date:      Wed Feb 08 19:02:58 2006 +0000

description:
Add distribution entries and supporting files for the iSCSI target.

diffstat:

 etc/Makefile          |   4 ++--
 etc/defaults/rc.conf  |   5 ++++-
 etc/iscsi/Makefile    |   7 +++++++
 etc/iscsi/auths       |  17 +++++++++++++++++
 etc/iscsi/targets     |  21 +++++++++++++++++++++
 etc/mtree/NetBSD.dist |   3 ++-
 etc/mtree/special     |   6 +++++-
 etc/rc.d/Makefile     |   4 ++--
 etc/rc.d/iscsi_target |  18 ++++++++++++++++++
 9 files changed, 78 insertions(+), 7 deletions(-)

diffs (178 lines):

diff -r 0fb205a84432 -r a4545b51990a etc/Makefile
--- a/etc/Makefile      Wed Feb 08 19:00:32 2006 +0000
+++ b/etc/Makefile      Wed Feb 08 19:02:58 2006 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.320 2006/01/29 14:03:59 apb Exp $
+#      $NetBSD: Makefile,v 1.321 2006/02/08 19:02:58 agc Exp $
 #      from: @(#)Makefile      8.7 (Berkeley) 5/25/95
 
 # Environment variables without default values:
@@ -315,7 +315,7 @@
        ${ETC_INSTALL_FILE} -o ${owner} -g ${group} -m ${mode} \
                /dev/null ${DESTDIR}${file}
 .endfor
-.for subdir in . defaults mtree namedb pam.d powerd rc.d root skel ssh
+.for subdir in . defaults iscsi mtree namedb pam.d powerd rc.d root skel ssh
        ${MAKEDIRTARGET} ${subdir} configinstall
 .endfor
        ${MAKEDIRTARGET} ${NETBSDSRCDIR}/usr.bin/mail configinstall
diff -r 0fb205a84432 -r a4545b51990a etc/defaults/rc.conf
--- a/etc/defaults/rc.conf      Wed Feb 08 19:00:32 2006 +0000
+++ b/etc/defaults/rc.conf      Wed Feb 08 19:02:58 2006 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: rc.conf,v 1.72 2006/02/08 15:32:24 christos Exp $
+#      $NetBSD: rc.conf,v 1.73 2006/02/08 19:02:59 agc Exp $
 #
 # /etc/defaults/rc.conf --
 #      default configuration of /etc/rc.conf
@@ -289,6 +289,9 @@
 # Heimdal Kerberos 5 KDC (with Kerberos IV compatibility)
 kdc=NO                 kdc_flags=""
 
+# iSCSI target
+iscsi_target=NO                iscsi_target_flags=""
+
 # ISDN daemon
 isdnd=NO               isdnd_flags=""
 
diff -r 0fb205a84432 -r a4545b51990a etc/iscsi/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/iscsi/Makefile        Wed Feb 08 19:02:58 2006 +0000
@@ -0,0 +1,7 @@
+#      $NetBSD: Makefile,v 1.1 2006/02/08 19:02:59 agc Exp $
+
+CONFIGFILES=    auths targets
+FILESDIR=       /etc/iscsi
+
+.include <bsd.files.mk>
+.include <bsd.prog.mk>
diff -r 0fb205a84432 -r a4545b51990a etc/iscsi/auths
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/iscsi/auths   Wed Feb 08 19:02:58 2006 +0000
@@ -0,0 +1,17 @@
+# $NetBSD: auths,v 1.1 2006/02/08 19:02:59 agc Exp $
+
+# test passwd file for iSCSI use
+
+nulltest:none:
+
+#chaptest1:chap:crysanthemum
+#chaptest2:CHAP:bannister
+#chaptest3:chap:Rhode Island Red
+
+# test users - throwback
+#alice:chap:alicePass
+#tom:chap:tomPass
+
+# real users
+#billy.nomates:chap:officer
+#iqn.1991-05.com.microsoft\:ws2:CHAP:1234567890123456
diff -r 0fb205a84432 -r a4545b51990a etc/iscsi/targets
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/iscsi/targets Wed Feb 08 19:02:58 2006 +0000
@@ -0,0 +1,21 @@
+# $NetBSD: targets,v 1.1 2006/02/08 19:02:59 agc Exp $
+#
+# Structure of this file:
+#
+# + an extent is a straight (offset, length) pair of a file or device
+#   it's the lowest common storage denominator
+#   at least one is needed
+# + a device is made up of one or more extents or other devices
+#   devices can be added in a hierachical manner, to enhance resilience
+# + in this example, no device definitions are necessary, as the target
+#   will just use a simple extent for persistent storage
+# + a target is made up of 1 or more devices
+# The code does not support RAID1 recovery at present
+
+# Simple file showing 1 extent, mapped straight into 1 target
+
+# extent       file or device          start           length
+extent0                /tmp/iscsi-target0      0               100MB
+
+# target       storage                 netmask
+target0                extent0                 0.0.0.0/0
diff -r 0fb205a84432 -r a4545b51990a etc/mtree/NetBSD.dist
--- a/etc/mtree/NetBSD.dist     Wed Feb 08 19:00:32 2006 +0000
+++ b/etc/mtree/NetBSD.dist     Wed Feb 08 19:02:58 2006 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: NetBSD.dist,v 1.297 2006/02/08 17:19:00 christos Exp $
+#      $NetBSD: NetBSD.dist,v 1.298 2006/02/08 19:02:59 agc Exp $
 #      @(#)4.4BSD.dist 8.1 (Berkeley) 6/13/93
 
 /set type=dir uname=root gname=wheel mode=0755
@@ -26,6 +26,7 @@
 ./etc/cgd                      mode=0700
 ./etc/defaults
 ./etc/fonts
+./etc/iscsi
 ./etc/kerberosIV
 ./etc/kerberosV
 ./etc/mail
diff -r 0fb205a84432 -r a4545b51990a etc/mtree/special
--- a/etc/mtree/special Wed Feb 08 19:00:32 2006 +0000
+++ b/etc/mtree/special Wed Feb 08 19:02:58 2006 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: special,v 1.89 2005/08/23 12:12:56 peter Exp $
+#      $NetBSD: special,v 1.90 2006/02/08 19:02:59 agc Exp $
 #      @(#)special     8.2 (Berkeley) 1/23/94
 #
 # Hand-crafted mtree specification for the dangerous files.
@@ -74,6 +74,9 @@
 ./etc/ipf6.conf                        type=file mode=0644 optional
 ./etc/ipnat.conf               type=file mode=0644 optional
 ./etc/ipsec.conf               type=file mode=0600 optional tags=nodiff
+./etc/iscsi                    type=dir  mode=0755
+./etc/iscsi/auths              type=file mode=0644
+./etc/iscsi/targets            type=file mode=0644
 ./etc/kerberosIV               type=dir  mode=0755 ignore optional
 ./etc/ld.so.conf               type=file mode=0644 optional
 ./etc/lkm.conf                 type=file mode=0644 optional
@@ -177,6 +180,7 @@
 ./etc/rc.d/ipmon               type=file mode=0555
 ./etc/rc.d/ipnat               type=file mode=0555
 ./etc/rc.d/ipsec               type=file mode=0555
+./etc/rc.d/iscsi_target                type=file mode=0555
 ./etc/rc.d/isdnd               type=file mode=0555
 ./etc/rc.d/kdc                 type=file mode=0555
 ./etc/rc.d/ldconfig            type=file mode=0555
diff -r 0fb205a84432 -r a4545b51990a etc/rc.d/Makefile
--- a/etc/rc.d/Makefile Wed Feb 08 19:00:32 2006 +0000
+++ b/etc/rc.d/Makefile Wed Feb 08 19:02:58 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.52 2005/08/23 12:12:56 peter Exp $
+# $NetBSD: Makefile,v 1.53 2006/02/08 19:02:59 agc Exp $
 
 .include <bsd.own.mk>
 
@@ -12,7 +12,7 @@
        accounting altqd amd apmd \
        bootparams bootconf.sh ccd cgd cleartmp cron \
        dhclient dhcpd dhcrelay dmesg downinterfaces fixsb fsck ftpd \
-       identd ifwatchd inetd ipfilter ipfs ipmon ipnat ipsec isdnd \
+       identd ifwatchd inetd ipfilter ipfs ipmon ipnat ipsec iscsi_target isdnd \
        kdc ldconfig lkm1 lkm2 lkm3 local lpd \
        mixerctl mopd motd mountall mountcritlocal mountcritremote mountd \
        moused mrouted \
diff -r 0fb205a84432 -r a4545b51990a etc/rc.d/iscsi_target
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/rc.d/iscsi_target     Wed Feb 08 19:02:58 2006 +0000
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# $NetBSD: iscsi_target,v 1.1 2006/02/08 19:02:59 agc Exp $
+#
+
+# PROVIDE: iscsi_target
+# REQUIRE: NETWORKING mountall beforemountlkm quota
+
+$_rc_subr_loaded . /etc/rc.subr
+
+name="iscsi_target"
+rcvar=$name
+command="/usr/sbin/iscsi-target"
+required_files="/etc/iscsi/targets"
+pidfile="/var/run/iscsi-target.pid"
+
+load_rc_config $name
+run_rc_command "$1"



Home | Main Index | Thread Index | Old Index