summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2012-02-09 08:35:05 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2012-02-09 08:35:05 +0000
commit08177cd4683f349532062609c3625fc369787eac (patch)
tree8f30b40a4320bdf390efa13589ebf340c0eedcab /sys-block/open-iscsi
parentBug #383437: Fix iSNS SLP linking in the main binaries. (diff)
downloadhistorical-08177cd4683f349532062609c3625fc369787eac.tar.gz
historical-08177cd4683f349532062609c3625fc369787eac.tar.bz2
historical-08177cd4683f349532062609c3625fc369787eac.zip
Bug #307619: improve init script for BL2.
Package-Manager: portage-2.2.0_alpha84/cvs/Linux x86_64
Diffstat (limited to 'sys-block/open-iscsi')
-rw-r--r--sys-block/open-iscsi/ChangeLog6
-rw-r--r--sys-block/open-iscsi/Manifest8
-rw-r--r--sys-block/open-iscsi/files/iscsid-2.0.871-r1.init.d28
-rw-r--r--sys-block/open-iscsi/files/iscsid-conf.d5
4 files changed, 31 insertions, 16 deletions
diff --git a/sys-block/open-iscsi/ChangeLog b/sys-block/open-iscsi/ChangeLog
index 4098cad51e48..faf0c2cede0f 100644
--- a/sys-block/open-iscsi/ChangeLog
+++ b/sys-block/open-iscsi/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for sys-block/open-iscsi
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-block/open-iscsi/ChangeLog,v 1.39 2012/02/09 08:29:45 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-block/open-iscsi/ChangeLog,v 1.40 2012/02/09 08:35:05 robbat2 Exp $
+
+ 09 Feb 2012; Robin H. Johnson <robbat2@gentoo.org>
+ files/iscsid-2.0.871-r1.init.d, files/iscsid-conf.d:
+ Bug #307619: improve init script for BL2.
09 Feb 2012; Robin H. Johnson <robbat2@gentoo.org> open-iscsi-2.0.872.ebuild,
+files/open-iscsi-2.0.872-isns-slp.patch:
diff --git a/sys-block/open-iscsi/Manifest b/sys-block/open-iscsi/Manifest
index 25345134aef6..508fa710fa5b 100644
--- a/sys-block/open-iscsi/Manifest
+++ b/sys-block/open-iscsi/Manifest
@@ -1,8 +1,10 @@
AUX CVE-2009-1297.patch 798 RMD160 e1f3411aef17b8e238928b88ebe008b2ae28c070 SHA1 55f3af418fb3eebe2b2f1ee59dc94b8a6ef0ad9a SHA256 b52320fb0e25876d7b9cd7a40e1a01246a9175822c98c3796d6e2822fda39af5
AUX initiatorname.iscsi 1282 RMD160 6af81c25d2704e2c6bb98ff5155de91cdbd17ff7 SHA1 2d2b0a50652772e0e3a16f3a90ef5977639b97ee SHA256 4ae558522881796f67ad5915ecf38d01e64c9d9768469847adb17405404485f3
-AUX iscsid-2.0.871-r1.init.d 2916 RMD160 8a596eaf43e9c708b92b948d73a7d6385854dd3c SHA1 2c2c514b01199ef94f955fffa58a0be464a1912b SHA256 e0a8c9aa68c0f87f7e9ac89b7299e5a905d33fd271d58f7d6d0bfaea661862c9
-AUX iscsid-conf.d 314 RMD160 de4885dcc1ed6440ea385b7b234deeaa9cb18478 SHA1 57b899e74027252f5686c0bf28aafbda6f669132 SHA256 673bf4744efc3276d372587c996270821d39dcdc0bf27a13691ea6b0e814b6d0
+AUX iscsid-2.0.871-r1.init.d 2974 RMD160 509d24130bcb8992d608456e1eee967f6338b189 SHA1 300cc8f65d5b67d23c3614a88a9b40d83de95433 SHA256 c99b8f85bb319cf1b304ab9322529f63ec213a3b61a53d360990ddc1f8766390
+AUX iscsid-conf.d 422 RMD160 b42412fd6782537a736420d656caf3b1f4369930 SHA1 315f0b30efdb2672f15fbc81406524f2959a9acc SHA256 3e2a63143e3167f20844ef94f1383180b69c245092583856fd26316674cf4114
AUX iscsid-init.d 2784 RMD160 92f19340add0cf178c451fb143d5871381e70480 SHA1 ce1be0f5e7e0b7f40371b9fb12f283ca713e295b SHA256 8ff8f100a6058d31605de54b1f210d5293c4b7441973e5793f42f67cac4fed30
+AUX iscsid-init.d.orig 2784 RMD160 92f19340add0cf178c451fb143d5871381e70480 SHA1 ce1be0f5e7e0b7f40371b9fb12f283ca713e295b SHA256 8ff8f100a6058d31605de54b1f210d5293c4b7441973e5793f42f67cac4fed30
+AUX iscsid-init.d.rej 1448 RMD160 4b69bbb044decf25f07a7a1b6d7a34c4cb67022b SHA1 63e0e0be3785ca9d5086d5ace626d11569e666ed SHA256 697fdf8a56d644bd20c4047a0f49f9963966e2c1c9a8d3aa516974d1a1c58e9a
AUX open-iscsi-2.0.871-makefile-cleanup.patch 1205 RMD160 04f60526916cd9a707e4c3158c6cb7edc7da4169 SHA1 be59e170705927b1b3dffd07329a1a20d067e8df SHA256 8412850ea40dd7b5bacbae18c760ef305df36dbaa507d9618555e32c8e8e2ae6
AUX open-iscsi-2.0.871.3-glibc212.patch 413 RMD160 d860af37c820da0dfca039b548a4392c1d94a617 SHA1 1930a6a8d3712db8f827794717132cb79a589e14 SHA256 e8904176278a437f26b9f6e62377c5c018fa7cae31ead28a1651b8ab7b4b951c
AUX open-iscsi-2.0.872-conf.d 422 RMD160 b42412fd6782537a736420d656caf3b1f4369930 SHA1 315f0b30efdb2672f15fbc81406524f2959a9acc SHA256 3e2a63143e3167f20844ef94f1383180b69c245092583856fd26316674cf4114
@@ -21,5 +23,5 @@ EBUILD open-iscsi-2.0.871-r1.ebuild 2580 RMD160 c7263baf111067c7016098ec971a8f5c
EBUILD open-iscsi-2.0.871.3.ebuild 2564 RMD160 d745fadfa0ec9bf5b24bca51e42cdc8498d69675 SHA1 20aa4def05cd16242d330c9a17c7ee39c8896d51 SHA256 47c655f1da09451d18812965074d8a164dc417064bef584738b964bf88e5ecf7
EBUILD open-iscsi-2.0.871.ebuild 3148 RMD160 24d72a0703ebacbb7f696aabb58087d6ef290b72 SHA1 42f9b5f3500113a1a5b0e3ceb64a5443d4473295 SHA256 89724af6ae57f974c653eec749df99a59d8308436f148781f4b8885844e31a89
EBUILD open-iscsi-2.0.872.ebuild 3005 RMD160 2d9d59e65592eb94781bd0d4c3460620b3ecc358 SHA1 d2716580d4973fcffc61a4ca214b4826595cd3dc SHA256 23b09e3dfe1893de0820353a513b985c9e04c07b1b47e13015815d40cf43fd59
-MISC ChangeLog 8625 RMD160 dd99538073d7c37660f21ff7103ac54f7595992d SHA1 a67f317104d649ad0662282b3fb89360653bff5b SHA256 8f2cf74968ce12a80e2a07051b73e7a828635de69ea8fabf2c269f93b30a958e
+MISC ChangeLog 8778 RMD160 51acd90b9dac79a0f10d60319550425057c59de2 SHA1 61f5c045cb6b81e58c8dc8e363fb530e40b7b718 SHA256 9881f2bddcc42424e748218aa35e27fc57efd13460676ad6a323d83461df3304
MISC metadata.xml 358 RMD160 151359f69c3aaca1234142bb4bfc10672d889db0 SHA1 c66b54154a95aed7882dca23751cfac819045a66 SHA256 4ab139872bd983e7fb651198aa9aadd1053ed613568bfdbcb612bfc508b8f856
diff --git a/sys-block/open-iscsi/files/iscsid-2.0.871-r1.init.d b/sys-block/open-iscsi/files/iscsid-2.0.871-r1.init.d
index 179c131923eb..afcdb5f76d96 100644
--- a/sys-block/open-iscsi/files/iscsid-2.0.871-r1.init.d
+++ b/sys-block/open-iscsi/files/iscsid-2.0.871-r1.init.d
@@ -1,7 +1,7 @@
#!/sbin/runscript
-# Copyright 1999-2008 Gentoo Technologies, Inc.
+# Copyright 1999-2012 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
-# $Header: /var/cvsroot/gentoo-x86/sys-block/open-iscsi/files/iscsid-2.0.871-r1.init.d,v 1.1 2009/11/12 09:29:48 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-block/open-iscsi/files/iscsid-2.0.871-r1.init.d,v 1.2 2012/02/09 08:35:05 robbat2 Exp $
opts="${opts} starttargets stoptargets restarttargets"
@@ -10,6 +10,9 @@ depend() {
use net
}
+PIDFILE=${PIDFILE:-/var/run/${SVCNAME}.pid}
+BINARY="/usr/sbin/iscsid"
+
checkconfig() {
if [ ! -e /etc/conf.d/${SVCNAME} ]; then
eerror "Config file /etc/conf.d/${SVCNAME} does not exist!"
@@ -71,7 +74,7 @@ start() {
fi
ebegin "Starting ${SVCNAME}"
- start-stop-daemon --start --quiet --exec /usr/sbin/iscsid -- ${OPTS}
+ start-stop-daemon --start --quiet --exec ${BINARY} -- ${OPTS}
ret=$?
if [ $ret -ne 0 ]; then
eend $?
@@ -81,7 +84,11 @@ start() {
# Start automatic targets when iscsid is started
if [ "${AUTOSTARTTARGETS}" = "yes" ]; then
starttargets
- return $?
+ ret=$?
+ if [ "${AUTOSTART}" = "strict" ] && [ $ret -ne 0 ]; then
+ stop
+ return $ret
+ fi
fi
return 0
}
@@ -89,12 +96,9 @@ start() {
stop() {
stoptargets
ebegin "Stopping ${SVCNAME}"
- start-stop-daemon --signal HUP --stop --quiet --exec /usr/sbin/iscsid #--pidfile $PID_FILE
+ start-stop-daemon --stop --quiet --exec ${BINARY} --pidfile ${PIDFILE}
eend $?
- # ugly, but pid file is not removed by iscsid
- rm -f $PID_FILE
-
do_modules 'Removing iSCSI modules' 'iscsi_tcp scsi_transport_iscsi libiscsi' '-r'
eend $?
}
@@ -102,18 +106,18 @@ stop() {
starttargets() {
ebegin "Setting up iSCSI targets"
/usr/sbin/iscsiadm -m node --loginall=automatic
- ret=$?
+ ret=$?
eend $ret
- return $ret
+ return $ret
}
stoptargets() {
ebegin "Disconnecting iSCSI targets"
sync
/usr/sbin/iscsiadm -m node --logoutall=all
- ret=$?
+ ret=$?
eend $ret
- return $ret
+ return $ret
}
restarttargets() {
diff --git a/sys-block/open-iscsi/files/iscsid-conf.d b/sys-block/open-iscsi/files/iscsid-conf.d
index 1c4cc4054264..02e584fbce52 100644
--- a/sys-block/open-iscsi/files/iscsid-conf.d
+++ b/sys-block/open-iscsi/files/iscsid-conf.d
@@ -11,3 +11,8 @@ OPTS="-i ${INITIATORNAME_FILE}"
# Start automatic targets when iscsid is started
AUTOSTARTTARGETS="yes"
+
+# if set to "strict", iscsid will stop, if connecting the
+# autostart targets failed
+# AUTOSTART="strict"
+