Module Name: src
Committed By: joerg
Date: Sat Feb 21 23:13:00 UTC 2015
Modified Files:
src/distrib/sets/lists/etc: mi
src/etc/defaults: rc.conf
src/etc/mtree: special
src/etc/rc.d: Makefile
src/usr.sbin/postinstall: postinstall
Added Files:
src/etc/rc.d: iscsid
Log Message:
Add rc script for /sbin/iscsid.
To generate a diff of this commit:
cvs rdiff -u -r1.234 -r1.235 src/distrib/sets/lists/etc/mi
cvs rdiff -u -r1.130 -r1.131 src/etc/defaults/rc.conf
cvs rdiff -u -r1.150 -r1.151 src/etc/mtree/special
cvs rdiff -u -r1.90 -r1.91 src/etc/rc.d/Makefile
cvs rdiff -u -r0 -r1.1 src/etc/rc.d/iscsid
cvs rdiff -u -r1.188 -r1.189 src/usr.sbin/postinstall/postinstall
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/distrib/sets/lists/etc/mi
diff -u src/distrib/sets/lists/etc/mi:1.234 src/distrib/sets/lists/etc/mi:1.235
--- src/distrib/sets/lists/etc/mi:1.234 Sun Jan 25 15:50:30 2015
+++ src/distrib/sets/lists/etc/mi Sat Feb 21 23:13:00 2015
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.234 2015/01/25 15:50:30 christos Exp $
+# $NetBSD: mi,v 1.235 2015/02/21 23:13:00 joerg Exp $
#
# Note: end-user configuration files that are moved to another location
# should not be marked "obsolete"; they should just be removed from
@@ -216,6 +216,7 @@
./etc/rc.d/ipsec etc-net-rc
./etc/rc.d/irdaattach etc-sys-rc
./etc/rc.d/iscsi_target etc-iscsi-rc
+./etc/rc.d/iscsid etc-iscsi-rc
./etc/rc.d/isdnd etc-isdn-rc
./etc/rc.d/isibootd etc-bootserver-rc
./etc/rc.d/kdc etc-krb5-rc
Index: src/etc/defaults/rc.conf
diff -u src/etc/defaults/rc.conf:1.130 src/etc/defaults/rc.conf:1.131
--- src/etc/defaults/rc.conf:1.130 Sun Jan 25 16:26:34 2015
+++ src/etc/defaults/rc.conf Sat Feb 21 23:13:00 2015
@@ -1,4 +1,4 @@
-# $NetBSD: rc.conf,v 1.130 2015/01/25 16:26:34 christos Exp $
+# $NetBSD: rc.conf,v 1.131 2015/02/21 23:13:00 joerg Exp $
#
# /etc/defaults/rc.conf --
# default configuration of /etc/rc.conf
@@ -297,6 +297,8 @@ kdc=NO kdc_flags="--detach"
# iSCSI target
iscsi_target=NO iscsi_target_flags=""
+# iSCSI kernel initiator
+iscsid=NO
# WPA daemons.
hostapd=NO hostapd_flags="-B /etc/hostapd.conf"
Index: src/etc/mtree/special
diff -u src/etc/mtree/special:1.150 src/etc/mtree/special:1.151
--- src/etc/mtree/special:1.150 Tue Dec 30 03:52:03 2014
+++ src/etc/mtree/special Sat Feb 21 23:13:00 2015
@@ -1,4 +1,4 @@
-# $NetBSD: special,v 1.150 2014/12/30 03:52:03 uebayasi Exp $
+# $NetBSD: special,v 1.151 2015/02/21 23:13:00 joerg Exp $
# @(#)special 8.2 (Berkeley) 1/23/94
#
# This file may be overwritten on upgrades.
@@ -221,6 +221,7 @@
./etc/rc.d/ipsec type=file mode=0555
./etc/rc.d/irdaattach type=file mode=0555
./etc/rc.d/iscsi_target type=file mode=0555
+./etc/rc.d/iscsid type=file mode=0555
./etc/rc.d/isdnd type=file mode=0555
./etc/rc.d/isibootd type=file mode=0555
./etc/rc.d/kdc type=file mode=0555
Index: src/etc/rc.d/Makefile
diff -u src/etc/rc.d/Makefile:1.90 src/etc/rc.d/Makefile:1.91
--- src/etc/rc.d/Makefile:1.90 Thu Sep 11 18:01:22 2014
+++ src/etc/rc.d/Makefile Sat Feb 21 23:13:00 2015
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.90 2014/09/11 18:01:22 roy Exp $
+# $NetBSD: Makefile,v 1.91 2015/02/21 23:13:00 joerg Exp $
.include <bsd.own.mk>
@@ -23,7 +23,7 @@ CONFIGFILES=\
gpio \
hostapd httpd \
identd ifwatchd inetd ipfilter ipfs ipmon ipnat ipsec \
- irdaattach iscsi_target isdnd isibootd \
+ irdaattach iscsi_target iscsid isdnd isibootd \
kdc \
ldconfig ldpd local lpd lvm \
makemandb mdnsd mixerctl mopd motd mountall mountcritlocal \
Index: src/usr.sbin/postinstall/postinstall
diff -u src/usr.sbin/postinstall/postinstall:1.188 src/usr.sbin/postinstall/postinstall:1.189
--- src/usr.sbin/postinstall/postinstall:1.188 Tue Dec 30 07:02:29 2014
+++ src/usr.sbin/postinstall/postinstall Sat Feb 21 23:13:00 2015
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: postinstall,v 1.188 2014/12/30 07:02:29 apb Exp $
+# $NetBSD: postinstall,v 1.189 2015/02/21 23:13:00 joerg Exp $
#
# Copyright (c) 2002-2008 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -1354,6 +1354,7 @@ ipnat
ipsec
irdaattach
iscsi_target
+iscsid
isdnd
isibootd
kdc
Added files:
Index: src/etc/rc.d/iscsid
diff -u /dev/null src/etc/rc.d/iscsid:1.1
--- /dev/null Sat Feb 21 23:13:00 2015
+++ src/etc/rc.d/iscsid Sat Feb 21 23:13:00 2015
@@ -0,0 +1,37 @@
+#!/bin/sh
+#
+# $NetBSD: iscsid,v 1.1 2015/02/21 23:13:00 joerg Exp $
+#
+
+# PROVIDE: iscsid
+# REQUIRE: NETWORKING mountcritlocal
+# BEFORE: securelevel mountcritremote
+
+$_rc_subr_loaded . /etc/rc.subr
+
+name="iscsid"
+rcvar=$name
+command="/sbin/${name}"
+pidfile="/var/run/${name}.pid"
+start_precmd="iscsid_precmd"
+
+find_module()
+{
+ local module rest
+ /sbin/modstat $1 | while read module rest; do
+ if [ "$module" = "$1" ]; then
+ echo found
+ break
+ fi
+ done
+}
+
+iscsid_precmd()
+{
+ if [ "$(find_module iscsi)" != "found" ]; then
+ /sbin/modload iscsi
+ fi
+}
+
+load_rc_config $name
+run_rc_command "$1"