summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Scherbaum <dertobi123@gentoo.org>2009-03-20 16:23:50 +0000
committerTobias Scherbaum <dertobi123@gentoo.org>2009-03-20 16:23:50 +0000
commitfe573e90d468573e9b973e91acdd9579a4c1b8fa (patch)
tree63f2982a481cd41ba4dc681d6454aedb64c15b01 /sys-block
parentclean up old cruft; fixes bug 227685 and bug 218144 (diff)
downloadhistorical-fe573e90d468573e9b973e91acdd9579a4c1b8fa.tar.gz
historical-fe573e90d468573e9b973e91acdd9579a4c1b8fa.tar.bz2
historical-fe573e90d468573e9b973e91acdd9579a4c1b8fa.zip
Version bump (#196096), Cleanup
Package-Manager: portage-2.2_rc26/cvs/Linux x86_64
Diffstat (limited to 'sys-block')
-rw-r--r--sys-block/open-iscsi/ChangeLog14
-rw-r--r--sys-block/open-iscsi/Manifest19
-rw-r--r--sys-block/open-iscsi/files/iscsid-2.0.868_rc1.conf.d11
-rw-r--r--sys-block/open-iscsi/files/iscsid-2.0.868_rc1.init.d66
-rw-r--r--sys-block/open-iscsi/files/iscsid-2.0.870.init.d106
-rw-r--r--sys-block/open-iscsi/files/iscsid-2.0.870.init.d-r1120
-rw-r--r--sys-block/open-iscsi/files/iscsid-conf.d (renamed from sys-block/open-iscsi/files/iscsid-2.0.870.conf.d)0
-rw-r--r--sys-block/open-iscsi/files/iscsid-init.d131
-rw-r--r--sys-block/open-iscsi/open-iscsi-2.0.865.12.ebuild94
-rw-r--r--sys-block/open-iscsi/open-iscsi-2.0.870-r1.ebuild100
-rw-r--r--sys-block/open-iscsi/open-iscsi-2.0.870.3.ebuild (renamed from sys-block/open-iscsi/open-iscsi-2.0.868_rc1.ebuild)30
-rw-r--r--sys-block/open-iscsi/open-iscsi-2.0.870.ebuild100
12 files changed, 116 insertions, 675 deletions
diff --git a/sys-block/open-iscsi/ChangeLog b/sys-block/open-iscsi/ChangeLog
index 23118627249f..c4ac82e97c68 100644
--- a/sys-block/open-iscsi/ChangeLog
+++ b/sys-block/open-iscsi/ChangeLog
@@ -1,6 +1,16 @@
# ChangeLog for sys-block/open-iscsi
-# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-block/open-iscsi/ChangeLog,v 1.19 2008/12/06 16:57:10 dertobi123 Exp $
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-block/open-iscsi/ChangeLog,v 1.20 2009/03/20 16:23:49 dertobi123 Exp $
+
+*open-iscsi-2.0.870.3 (20 Mar 2009)
+
+ 20 Mar 2009; Tobias Scherbaum <dertobi123@gentoo.org>
+ -files/iscsid-2.0.868_rc1.conf.d, -files/iscsid-2.0.868_rc1.init.d,
+ -files/iscsid-2.0.870.init.d, -files/iscsid-2.0.870.init.d-r1,
+ +files/iscsid-conf.d, files/iscsid-init.d, -open-iscsi-2.0.865.12.ebuild,
+ -open-iscsi-2.0.868_rc1.ebuild, -open-iscsi-2.0.870.ebuild,
+ -open-iscsi-2.0.870-r1.ebuild, +open-iscsi-2.0.870.3.ebuild:
+ Version bump (#196096), Cleanup
*open-iscsi-2.0.870-r1 (06 Dec 2008)
diff --git a/sys-block/open-iscsi/Manifest b/sys-block/open-iscsi/Manifest
index c73cbb9269e8..450f3ababca8 100644
--- a/sys-block/open-iscsi/Manifest
+++ b/sys-block/open-iscsi/Manifest
@@ -1,16 +1,7 @@
AUX initiatorname.iscsi 1282 RMD160 6af81c25d2704e2c6bb98ff5155de91cdbd17ff7 SHA1 2d2b0a50652772e0e3a16f3a90ef5977639b97ee SHA256 4ae558522881796f67ad5915ecf38d01e64c9d9768469847adb17405404485f3
-AUX iscsid-2.0.868_rc1.conf.d 242 RMD160 9de3648df641408c467c8c91e1fc52ae58a31b2d SHA1 27b32fcf0eca189658ccb1028d33892acd7556fb SHA256 4ca57ef1823aa9696d2be9e49da04dba00f2daa64feb8d9deb6c13f1112154f8
-AUX iscsid-2.0.868_rc1.init.d 1755 RMD160 f826a2ec99d4007193a12fb3ec3cf1defe5590a0 SHA1 f6e9099ba90215eafec6259fd7c6373aa36dad4b SHA256 1d8a89767b95e56d7bde552ba93ddc4ee541bbf384ff480b82ad7fc59f52b276
-AUX iscsid-2.0.870.conf.d 314 RMD160 de4885dcc1ed6440ea385b7b234deeaa9cb18478 SHA1 57b899e74027252f5686c0bf28aafbda6f669132 SHA256 673bf4744efc3276d372587c996270821d39dcdc0bf27a13691ea6b0e814b6d0
-AUX iscsid-2.0.870.init.d 2528 RMD160 6c07f85e4e3ec02f0b9a404e33472700e205f62d SHA1 157c5d9c159fe9f7de66bae38921bb9241d422c0 SHA256 a083d2e2bf128794c9db557bff757d56ac25b91e6760b2e6a7b0384463eb27af
-AUX iscsid-2.0.870.init.d-r1 2896 RMD160 ad1ae3e206821453addff75c82c55c47158754b7 SHA1 bb48f7f6006bbd7c8562634a0b50867ab4e7f0d9 SHA256 2ae721b0b562626294dee36da5387d20c11ad951b53a0a723eb72bba58283cfa
-AUX iscsid-init.d 2541 RMD160 cda6eddbf72c399127d74d7aca62769789dfe98a SHA1 34554031fa23fd1d397e11d6523a77061e4ab992 SHA256 60903a4a356f2a201c978e42b6adb6233ffcda6105000e1029d93d6406dad904
-DIST open-iscsi-2.0-865.12.tar.gz 230395 RMD160 b663cc4773a9ec55ce0e27de63e53d334a1e7111 SHA1 e5e6e23f7f8b624f29ffeecf80ed8332e0048718 SHA256 f6413d9d7f03bdcac76a3dfa3931a163553694937ae9170aa79ef3d91eae13e5
-DIST open-iscsi-2.0-868-rc1.tar.gz 275494 RMD160 22ed6b42710dd8bc652b3c467f7af89a12c2aa39 SHA1 7a1c84f04d2190075a125e897b717fac9a7332bb SHA256 0c3d956063e0c3d6f1d8ed12fae7e7ea109a1e5872abd362e2ab3e41674c7222
-DIST open-iscsi-2.0-870.tar.gz 301105 RMD160 25f6a8dbe47e89d0f600c5fc6e25bc08cac5d99d SHA1 1365b5f370224aba5be1265e4439ef00a6765330 SHA256 7d42d030aef768d732439a26f0b04c9abe848902855d00cc6ad818f56815bfc6
-EBUILD open-iscsi-2.0.865.12.ebuild 2572 RMD160 e6ac1699d340a98cd5155789191fb1fa5a08ab11 SHA1 2e5800ab5853179b014c4693ed8449b2cd301d48 SHA256 aa3ecb705af8564581cebfaaefb0c320fec04df6838fdfd7bd53fa061a2159fc
-EBUILD open-iscsi-2.0.868_rc1.ebuild 2625 RMD160 0f1e4ab6a8d25b203b563a233ec6244e2dbe5359 SHA1 a7d65c5575a055bccfcd665491b698c473963f0d SHA256 9e62208a5ab246712960fc8a13df9460125e507ee5cf60f3a139edd2eb64c554
-EBUILD open-iscsi-2.0.870-r1.ebuild 2650 RMD160 e0c051a52b392652bfff73b34ebd9facf266a548 SHA1 de5b7f0897967257a12368f0f900302203b5af6c SHA256 8a53e97d8e00552bd76250338d788be7d299a2dedfe5039ba320f6107175474f
-EBUILD open-iscsi-2.0.870.ebuild 2644 RMD160 8235b484002092d9c1654f19297c7818f32d0744 SHA1 be27bbc9c973bafa2c688b6176178f39159ef904 SHA256 c7ee3b1f0a962cc5d5ed4baa04f8d88ebcb9a4a8c04cb5d157fd77212fddc8fb
-MISC ChangeLog 4422 RMD160 bca5af1373b23370124325cf5ceb721dd9b64c68 SHA1 e5eeec5012fe674866ab837281d0aa5297bfe5dd SHA256 175d15aa67ab336974c74881e4733830c79e273fccd13d973958992a3db3098a
+AUX iscsid-conf.d 314 RMD160 de4885dcc1ed6440ea385b7b234deeaa9cb18478 SHA1 57b899e74027252f5686c0bf28aafbda6f669132 SHA256 673bf4744efc3276d372587c996270821d39dcdc0bf27a13691ea6b0e814b6d0
+AUX iscsid-init.d 2784 RMD160 92f19340add0cf178c451fb143d5871381e70480 SHA1 ce1be0f5e7e0b7f40371b9fb12f283ca713e295b SHA256 8ff8f100a6058d31605de54b1f210d5293c4b7441973e5793f42f67cac4fed30
+DIST open-iscsi-2.0-870.3.tar.gz 301242 RMD160 f3be0aeaa7b2988a794983bc6d88511026605b13 SHA1 bc8253558b1a6b0c12ec0fbb0f01d6cb56d39395 SHA256 8ca6708895b17424efe20a4f6cbdf32ea44c40e7d9faa0f9c44bd720bae715ec
+EBUILD open-iscsi-2.0.870.3.ebuild 3029 RMD160 0875c174fc0702d5f641a1f5cb07a88624cfd158 SHA1 3db4a81abb79a32da620780b72f4ee4d8af98f21 SHA256 d6898af3385735c8aaa36b5dc5ea78a227fb0e84d52bbba0c0492370067579c6
+MISC ChangeLog 4886 RMD160 44c750bc14af369c0dd6fc7f04bae8ba17c09ba3 SHA1 7cb41ce615fe039bdf408995010071a328b9425a SHA256 e34276a8d6ee7eed76552d2909ad9377acef9fe107be1a8a1391d566a0e3423f
MISC metadata.xml 366 RMD160 e6901bcc9954fa2e7ebdc201be3f117f2769d11e SHA1 2f12a23a3bd4a33409183a32a99708dc4ce236e4 SHA256 023a201ecaa94699b402156f02c08c416e6eed0584f2096152605f3bef5df31a
diff --git a/sys-block/open-iscsi/files/iscsid-2.0.868_rc1.conf.d b/sys-block/open-iscsi/files/iscsid-2.0.868_rc1.conf.d
deleted file mode 100644
index 37dbbe14d04d..000000000000
--- a/sys-block/open-iscsi/files/iscsid-2.0.868_rc1.conf.d
+++ /dev/null
@@ -1,11 +0,0 @@
-# /etc/conf.d/iscsid
-
-# config file to use
-CONFIG_FILE=/etc/iscsi/iscsid.conf
-
-# you need to specify an initiatorname in the file
-INITIATORNAME_FILE=/etc/iscsi/initiatorname.iscsi
-
-# options to pass to iscsid
-OPTS="-i ${INITIATORNAME_FILE}"
-
diff --git a/sys-block/open-iscsi/files/iscsid-2.0.868_rc1.init.d b/sys-block/open-iscsi/files/iscsid-2.0.868_rc1.init.d
deleted file mode 100644
index 2b70d6494b4b..000000000000
--- a/sys-block/open-iscsi/files/iscsid-2.0.868_rc1.init.d
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2005 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.868_rc1.init.d,v 1.1 2008/03/25 02:33:04 kingtaco Exp $
-
-depend() {
- after modules
- use net
-}
-
-checkconfig() {
- if [ ! -f $CONFIG_FILE ]; then
- eerror "Config file $CONFIG_FILE does not exist!"
- return 1
- fi
- if ! grep "^InitiatorName=iqn." ${INITIATORNAME_FILE} &>/dev/null; then
- ewarn "${INITIATORNAME_FILE} should contain a string with your initiatior name."
- IQN=iqn.$(date +%Y-%m).$(hostname -f | awk 'BEGIN { FS=".";}{x=NF; while (x>0) {printf $x ;x--; if (x>0) printf ".";} print ""}'):openiscsi
- IQN=${IQN}-$(echo ${RANDOM}${RANDOM}${RANDOM}${RANDOM}${RANDOM} | md5sum | sed -e "s/\(.*\) -/\1/g" -e 's/ //g')
- ebegin "Creating InitiatorName ${IQN} in ${INITIATORNAME_FILE}"
- echo "InitiatorName=${IQN}" >> ${INITIATORNAME_FILE}
- eend $?
- fi
-}
-
-do_modules() {
- msg="$1"
- shift
- modules="$1"
- shift
- opts="$@"
- for m in ${modules}; do
- ebegin "${msg} - ${m}"
- modprobe ${opts} $m
- ret=$?
- eend $ret
- [ $ret -ne 0 ] && return $ret
- done
- return 0
-}
-
-start() {
- checkconfig
- do_modules 'Loading iSCSI modules' 'scsi_transport_iscsi iscsi_tcp'
- ret=$?
- [ $ret -ne 0 ] && return 1
- ebegin "Starting ${SVCNAME}"
- start-stop-daemon --start --quiet --exec /usr/sbin/iscsid -- ${OPTS}
- ret=$?
- eend $ret
- return $ret
-}
-
-stop() {
- ebegin "Stopping ${SVCNAME}"
- start-stop-daemon --signal HUP --stop --quiet --exec /usr/sbin/iscsid #--pidfile $PID_FILE
- eend $?
-
- # ugly, but pid file is not removed by iscsid
- rm -f $PID_FILE
-
- do_modules 'Removing iSCSI modules' 'iscsi_tcp scsi_transport_iscsi' '-r'
- ret=$?
- return $ret
-}
-
diff --git a/sys-block/open-iscsi/files/iscsid-2.0.870.init.d b/sys-block/open-iscsi/files/iscsid-2.0.870.init.d
deleted file mode 100644
index df23c5b0be51..000000000000
--- a/sys-block/open-iscsi/files/iscsid-2.0.870.init.d
+++ /dev/null
@@ -1,106 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2008 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.870.init.d,v 1.1 2008/11/17 20:58:44 dertobi123 Exp $
-
-opts="${opts} starttargets stoptargets restarttargets"
-
-depend() {
- after modules
- use net
-}
-
-checkconfig() {
- if [ ! -f ${CONFIG_FILE} ]; then
- eerror "Config file ${CONFIG_FILE} does not exist!"
- return 1
- fi
- if ! grep -q "^InitiatorName=iqn\." ${INITIATORNAME_FILE}; then
- ewarn "${INITIATORNAME_FILE} should contain a string with your initiatior name."
- IQN=iqn.$(date +%Y-%m).$(hostname -f | awk 'BEGIN { FS=".";}{x=NF; while (x>0) {printf $x ;x--; if (x>0) printf ".";} print ""}'):openiscsi
- IQN=${IQN}-$(echo ${RANDOM}${RANDOM}${RANDOM}${RANDOM}${RANDOM} | md5sum | sed -e "s/\(.*\) -/\1/g" -e 's/ //g')
- ebegin "Creating InitiatorName ${IQN} in ${INITIATORNAME_FILE}"
- echo "InitiatorName=${IQN}" >> ${INITIATORNAME_FILE}
- eend $?
- fi
-}
-
-do_modules() {
- msg="$1"
- shift
- modules="${1}"
- shift
- modopts="$@"
- for m in ${modules}
- do
- if [ -n "$(modprobe -l | grep ${m})" ]
- then
- ebegin "${msg} ${m}"
- modprobe ${modopts} ${m}
- ret=$?
- eend ${ret}
- if [ ${ret} -ne 0 ]; then
- return ${ret}
- fi
- else
- ebegin "${msg} ${m}: not found"
- return 1
- fi
- done
- return 0
-}
-
-start() {
- checkconfig
- ebegin "Loading iSCSI modules"
- do_modules 'Loading' 'libiscsi scsi_transport_iscsi iscsi_tcp'
- ret=$?
- if [ $ret -ne 0 ]; then
- eend 1
- return 1
- fi
-
- ebegin "Starting ${SVCNAME}"
- start-stop-daemon --start --quiet --exec /usr/sbin/iscsid -- ${OPTS}
- eend $?
-
- # Start automatic targets when iscsid is started
- [ "${AUTOSTARTTARGETS}" = "yes" ] && starttargets
- return 0
-}
-
-stop() {
- stoptargets
- ebegin "Stopping ${SVCNAME}"
- start-stop-daemon --signal HUP --stop --quiet --exec /usr/sbin/iscsid #--pidfile $PID_FILE
- 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 $?
-}
-
-starttargets() {
- ebegin "Setting up iSCSI targets"
- /usr/sbin/iscsiadm -m node --loginall=automatic
- eend $?
-}
-
-stoptargets() {
- ebegin "Disconnecting iSCSI targets"
- sync
- /usr/sbin/iscsiadm -m node --logoutall=all
- eend $?
-}
-
-restarttargets() {
- stoptargets
- starttargets
-}
-
-status() {
- ebegin "Showing current active iSCSI sessions"
- /usr/sbin/iscsiadm -m session
-}
diff --git a/sys-block/open-iscsi/files/iscsid-2.0.870.init.d-r1 b/sys-block/open-iscsi/files/iscsid-2.0.870.init.d-r1
deleted file mode 100644
index 252702c56fae..000000000000
--- a/sys-block/open-iscsi/files/iscsid-2.0.870.init.d-r1
+++ /dev/null
@@ -1,120 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2008 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.870.init.d-r1,v 1.1 2008/12/06 16:57:10 dertobi123 Exp $
-
-opts="${opts} starttargets stoptargets restarttargets"
-
-depend() {
- after modules
- use net
-}
-
-checkconfig() {
- if [ ! -e /etc/conf.d/${SVCNAME} ]; then
- eerror "Config file /etc/conf.d/${SVCNAME} does not exist!"
- return 1
- fi
- if [ ! -e "${CONFIG_FILE}" ]; then
- eerror "Config file ${CONFIG_FILE} does not exist!"
- return 1
- fi
- if [ ! -e "${INITIATORNAME_FILE}" ]; then
- eerror "Config file for InitiatorName (${INITIATORNAME_FILE}) does not exist!"
- return 1
- fi
- if ! grep -q "^InitiatorName=iqn\." "${INITIATORNAME_FILE}"; then
- ewarn "${INITIATORNAME_FILE} should contain a string with your initiatior name."
- IQN=iqn.$(date +%Y-%m).$(hostname -f | awk 'BEGIN { FS=".";}{x=NF; while (x>0) {printf $x ;x--; if (x>0) printf ".";} print ""}'):openiscsi
- IQN=${IQN}-$(echo ${RANDOM}${RANDOM}${RANDOM}${RANDOM}${RANDOM} | md5sum | sed -e "s/\(.*\) -/\1/g" -e 's/ //g')
- ebegin "Creating InitiatorName ${IQN} in ${INITIATORNAME_FILE}"
- echo "InitiatorName=${IQN}" >> "${INITIATORNAME_FILE}"
- eend $?
- fi
-}
-
-do_modules() {
- msg="$1"
- shift
- modules="${1}"
- shift
- modopts="$@"
- for m in ${modules}
- do
- if [ -n "$(modprobe -l | grep ${m})" ]
- then
- ebegin "${msg} ${m}"
- modprobe ${modopts} ${m}
- ret=$?
- eend ${ret}
- if [ ${ret} -ne 0 ]; then
- return ${ret}
- fi
- else
- ebegin "${msg} ${m}: not found"
- return 1
- fi
- done
- return 0
-}
-
-start() {
- ebegin "Checking open-iSCSI configuration"
- checkconfig
- ret=$?
- if [ $ret -ne 0 ]; then
- eend 1
- return 1
- fi
- ebegin "Loading iSCSI modules"
- do_modules 'Loading' 'libiscsi scsi_transport_iscsi iscsi_tcp'
- ret=$?
- if [ $ret -ne 0 ]; then
- eend 1
- return 1
- fi
-
- ebegin "Starting ${SVCNAME}"
- start-stop-daemon --start --quiet --exec /usr/sbin/iscsid -- ${OPTS}
- eend $?
-
- # Start automatic targets when iscsid is started
- [ "${AUTOSTARTTARGETS}" = "yes" ] && starttargets
- return 0
-}
-
-stop() {
- stoptargets
- ebegin "Stopping ${SVCNAME}"
- start-stop-daemon --signal HUP --stop --quiet --exec /usr/sbin/iscsid #--pidfile $PID_FILE
- 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 $?
-}
-
-starttargets() {
- ebegin "Setting up iSCSI targets"
- /usr/sbin/iscsiadm -m node --loginall=automatic
- eend $?
-}
-
-stoptargets() {
- ebegin "Disconnecting iSCSI targets"
- sync
- /usr/sbin/iscsiadm -m node --logoutall=all
- eend $?
-}
-
-restarttargets() {
- stoptargets
- starttargets
-}
-
-status() {
- ebegin "Showing current active iSCSI sessions"
- /usr/sbin/iscsiadm -m session
-}
diff --git a/sys-block/open-iscsi/files/iscsid-2.0.870.conf.d b/sys-block/open-iscsi/files/iscsid-conf.d
index 1c4cc4054264..1c4cc4054264 100644
--- a/sys-block/open-iscsi/files/iscsid-2.0.870.conf.d
+++ b/sys-block/open-iscsi/files/iscsid-conf.d
diff --git a/sys-block/open-iscsi/files/iscsid-init.d b/sys-block/open-iscsi/files/iscsid-init.d
index faedcb193dfe..6ef184b32cf8 100644
--- a/sys-block/open-iscsi/files/iscsid-init.d
+++ b/sys-block/open-iscsi/files/iscsid-init.d
@@ -1,16 +1,9 @@
#!/sbin/runscript
-# Copyright 1999-2005 Gentoo Technologies, Inc.
+# Copyright 1999-2008 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-init.d,v 1.4 2006/03/07 08:26:46 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-block/open-iscsi/files/iscsid-init.d,v 1.5 2009/03/20 16:23:50 dertobi123 Exp $
-PID_FILE=/var/run/iscsid.pid
-CONFIG_FILE=/etc/iscsid.conf
-DUMP_DIR=/var/db/iscsi
-DUMP_NODE="${DUMP_DIR}/node.dump"
-DUMP_DISCOVERY="${DUMP_DIR}/discovery.dump"
-INITIATORNAME=/etc/initiatorname.iscsi
-DAEMON=/usr/sbin/iscsid
-NAME="iSCSI initiator service"
+opts="${opts} starttargets stoptargets restarttargets"
depend() {
after modules
@@ -18,78 +11,106 @@ depend() {
}
checkconfig() {
- if [ ! -f $CONFIG_FILE ]; then
- eerror "Config file $CONFIG_FILE does not exist!"
+ if [ ! -e /etc/conf.d/${SVCNAME} ]; then
+ eerror "Config file /etc/conf.d/${SVCNAME} does not exist!"
return 1
fi
- if [ ! -f $INITIATORNAME -o -z "$(egrep '^InitiatorName=' "${INITIATORNAME}")" ]; then
- eerror "$INITIATORNAME should contain a string with your initiatior name, eg:"
- eerror "InitiatorName=iqn.2005-09.tld.domainname.hostname:initiator-name"
- eerror "Initiator name file does not exist!"
+ if [ ! -e "${CONFIG_FILE}" ]; then
+ eerror "Config file ${CONFIG_FILE} does not exist!"
return 1
fi
+ if [ ! -e ${INITIATORNAME_FILE} ] || [ ! "$(grep "^InitiatorName=iqn\." ${INITIATORNAME_FILE})" ]; then
+ ewarn "${INITIATORNAME_FILE} should contain a string with your initiatior name."
+ IQN=iqn.$(date +%Y-%m).$(hostname -f | awk 'BEGIN { FS=".";}{x=NF; while (x>0) {printf $x ;x--; if (x>0) printf ".";} print ""}'):openiscsi
+ IQN=${IQN}-$(echo ${RANDOM}${RANDOM}${RANDOM}${RANDOM}${RANDOM} | md5sum | sed -e "s/\(.*\) -/\1/g" -e 's/ //g')
+ ebegin "Creating InitiatorName ${IQN} in ${INITIATORNAME_FILE}"
+ echo "InitiatorName=${IQN}" >> "${INITIATORNAME_FILE}"
+ eend $?
+ fi
}
do_modules() {
msg="$1"
shift
- modules="$1"
+ modules="${1}"
shift
- opts="$@"
- for m in ${modules}; do
- ebegin "${msg} - ${m}"
- modprobe ${opts} $m
- ret=$?
- eend $ret
- [ $ret -ne 0 ] && return $ret
+ modopts="$@"
+ for m in ${modules}
+ do
+ if [ -n "$(modprobe -l | grep ${m})" ]
+ then
+ ebegin "${msg} ${m}"
+ modprobe ${modopts} ${m}
+ ret=$?
+ eend ${ret}
+ if [ ${ret} -ne 0 ]; then
+ return ${ret}
+ fi
+ else
+ ebegin "${msg} ${m}: not found"
+ return 1
+ fi
done
return 0
}
start() {
- checkconfig || return 1
- do_modules 'Loading iSCSI modules' 'scsi_transport_iscsi iscsi_tcp'
+ ebegin "Checking open-iSCSI configuration"
+ checkconfig
ret=$?
- [ $ret -ne 0 ] && return 1
- ebegin "Starting ${NAME}"
- start-stop-daemon --start --exec $DAEMON --quiet
+ if [ $ret -ne 0 ]; then
+ eend 1
+ return 1
+ fi
+ ebegin "Loading iSCSI modules"
+ do_modules 'Loading' 'libiscsi scsi_transport_iscsi iscsi_tcp'
ret=$?
- eend $ret
- return $ret
+ if [ $ret -ne 0 ]; then
+ eend 1
+ return 1
+ fi
+
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --quiet --exec /usr/sbin/iscsid -- ${OPTS}
+ eend $?
+
+ # Start automatic targets when iscsid is started
+ [ "${AUTOSTARTTARGETS}" = "yes" ] && starttargets
+ return 0
}
stop() {
- ebegin "Stopping ${NAME}"
- start-stop-daemon --signal HUP --stop --quiet --exec $DAEMON #--pidfile $PID_FILE
+ stoptargets
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --signal HUP --stop --quiet --exec /usr/sbin/iscsid #--pidfile $PID_FILE
eend $?
# ugly, but pid file is not removed by iscsid
rm -f $PID_FILE
- do_modules 'Removing iSCSI modules' 'iscsi_tcp scsi_transport_iscsi' '-r'
- ret=$?
- return $ret
+ do_modules 'Removing iSCSI modules' 'iscsi_tcp scsi_transport_iscsi libiscsi' '-r'
+ eend $?
}
-opts="${opts} dump"
+starttargets() {
+ ebegin "Setting up iSCSI targets"
+ /usr/sbin/iscsiadm -m node --loginall=automatic
+ eend $?
+}
-dump() {
- einfo "Starting dump of iscsid database (nodes)"
- NODELIST="$(iscsiadm -m node | awk -F '[\\[\\]]' '{print $2}')"
- [ -f ${DUMP_NODE} ] && mv -f ${DUMP_NODE} ${DUMP_NODE}.old
- for i in $NODELIST ; do
- echo "# $(iscsiadm -m node | egrep "^\[$i\]")" >>${DUMP_NODE}
- iscsiadm -m node --record=$i >>${DUMP_NODE}
- echo >>${DUMP_NODE}
- done
- einfo "Starting dump of iscsid database (discovery)"
- DISCOVERYLIST="$(iscsiadm -m discovery | awk -F '[\\[\\]]' '{print $2}')"
- [ -f ${DUMP_DISCOVERY} ] && mv -f ${DUMP_DISCOVERY} ${DUMP_DISCOVERY}.old
- for i in $DISCOVERYLIST ; do
- echo "# $(iscsiadm -m discovery | egrep "^\[$i\]")" >>${DUMP_DISCOVERY}
- iscsiadm -m discovery --record=$i >>${DUMP_DISCOVERY}
- echo >>${DUMP_DISCOVERY}
- done
+stoptargets() {
+ ebegin "Disconnecting iSCSI targets"
+ sync
+ /usr/sbin/iscsiadm -m node --logoutall=all
+ eend $?
+}
+
+restarttargets() {
+ stoptargets
+ starttargets
+}
- einfo "Config dumped to ${DUMP_DIR}/"
+status() {
+ ebegin "Showing current active iSCSI sessions"
+ /usr/sbin/iscsiadm -m session
}
diff --git a/sys-block/open-iscsi/open-iscsi-2.0.865.12.ebuild b/sys-block/open-iscsi/open-iscsi-2.0.865.12.ebuild
deleted file mode 100644
index 31772e90b81e..000000000000
--- a/sys-block/open-iscsi/open-iscsi-2.0.865.12.ebuild
+++ /dev/null
@@ -1,94 +0,0 @@
-# Copyright 1999-2008 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-block/open-iscsi/open-iscsi-2.0.865.12.ebuild,v 1.3 2008/01/14 01:29:00 robbat2 Exp $
-
-inherit versionator linux-mod eutils flag-o-matic
-
-DESCRIPTION="Open-iSCSI is a high performance, transport independent, multi-platform implementation of RFC3720"
-HOMEPAGE="http://www.open-iscsi.org/"
-MY_PV="$(replace_version_separator 2 '-')"
-MY_SVN_R=865
-MY_P="${PN}-${MY_PV}"
-SRC_URI="http://www.open-iscsi.org/bits/${MY_P}.tar.gz"
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~x86 ~amd64 ~ppc"
-IUSE="debug"
-DEPEND="virtual/libc
- virtual/linux-sources"
-RDEPEND="${DEPEND}
- virtual/modutils
- sys-apps/util-linux"
-
-S="${WORKDIR}/${MY_P}"
-
-MODULE_NAMES_ARG="kernel/drivers/scsi:${S}/kernel"
-MODULE_NAMES="iscsi_tcp(${MODULE_NAMES_ARG}) scsi_transport_iscsi(${MODULE_NAMES_ARG}) libiscsi(${MODULE_NAMES_ARG})"
-BUILD_TARGETS="all"
-CONFIG_CHECK="CRYPTO_CRC32C"
-ERROR_CFG="open-iscsi needs CRC32C support in your kernel."
-
-src_unpack() {
- unpack ${A}
- #export EPATCH_OPTS="-d${S}/kernel -p0"
- export EPATCH_OPTS="-d${S}"
- if [ $KV_PATCH -lt 15 ]; then
- die "Sorry, your kernel must be 2.6.16-rc5 or newer!"
- elif [ $KV_PATCH -eq 16 ]; then
- einfo "2.6.16 or newer found."
- einfo "Please file a bug if this does not compile."
- fi
-
- # clean up some junk
- find "${S}" -name '*~' -exec rm \{} \; >/dev/null 2>/dev/null
-}
-
-src_compile() {
- use debug && append-flags -DDEBUG_TCP -DDEBUG_SCSI
-
- einfo "Building kernel modules"
- export KSRC="${KERNEL_DIR}"
- linux-mod_src_compile || die "failed to build modules"
- einfo "Building userspace"
- cd "${S}"/usr && \
- CFLAGS="" emake OPTFLAGS="${CFLAGS}" \
- || die "emake failed"
-}
-
-src_install() {
- einfo "Installing kernel modules"
- export KSRC="${KERNEL_DIR}"
- #S=${S}/kernel
- linux-mod_src_install
-
- einfo "Installing userspace"
- dosbin usr/iscsid usr/iscsiadm usr/iscsistart
-
- einfo "Installing docs"
- doman doc/*[1-8]
- dodoc README THANKS
- docinto test
- dodoc test/*
-
- einfo "Installing configuration"
- insinto /etc
- doins etc/iscsid.conf
- doins "${FILESDIR}"/initiatorname.iscsi
- newinitd "${FILESDIR}"/iscsid-init.d iscsid
-
- # This is for later
- # dosbin usr/iscsi_id
- #insinto /etc/udev/rules.d/
- #doins doc/iscsi-55.rules
-
- # security
- keepdir /var/db/iscsi
- fperms 700 /var/db/iscsi
- fperms 600 /etc/iscsid.conf
-}
-
-pkg_postinst() {
- linux-mod_pkg_postinst
- [ -d "${ROOT}"/var/db/iscsi ] && chmod 700 "${ROOT}"/var/db/iscsi
- [ -f "${ROOT}"/etc/iscsid.conf ] && chmod 600 "${ROOT}"/etc/iscsid.conf
-}
diff --git a/sys-block/open-iscsi/open-iscsi-2.0.870-r1.ebuild b/sys-block/open-iscsi/open-iscsi-2.0.870-r1.ebuild
deleted file mode 100644
index 2f7bf0e08bd2..000000000000
--- a/sys-block/open-iscsi/open-iscsi-2.0.870-r1.ebuild
+++ /dev/null
@@ -1,100 +0,0 @@
-# Copyright 1999-2008 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-block/open-iscsi/open-iscsi-2.0.870-r1.ebuild,v 1.1 2008/12/06 16:57:10 dertobi123 Exp $
-
-inherit versionator linux-mod eutils flag-o-matic toolchain-funcs
-
-DESCRIPTION="Open-iSCSI is a high performance, transport independent, multi-platform implementation of RFC3720"
-HOMEPAGE="http://www.open-iscsi.org/"
-MY_PV="${PN}-$(replace_version_separator 2 "-" $MY_PV)"
-SRC_URI="http://www.open-iscsi.org/bits/${MY_PV}.tar.gz"
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~x86 ~amd64 ~ppc ~mips"
-IUSE="modules utils debug"
-DEPEND="virtual/libc
- virtual/linux-sources"
-RDEPEND="${DEPEND}
- virtual/modutils
- sys-apps/util-linux"
-
-S="${WORKDIR}/${MY_PV}"
-
-MODULE_NAMES_ARG="kernel/drivers/scsi:${S}/kernel"
-MODULE_NAMES="iscsi_tcp(${MODULE_NAMES_ARG}) scsi_transport_iscsi(${MODULE_NAMES_ARG}) libiscsi(${MODULE_NAMES_ARG})"
-BUILD_TARGETS="all"
-CONFIG_CHECK="CRYPTO_CRC32C"
-ERROR_CFG="open-iscsi needs CRC32C support in your kernel."
-
-src_unpack() {
- unpack ${A}
- export EPATCH_OPTS="-d${S}"
- if [ $KV_PATCH -lt 15 ]; then
- die "Sorry, your kernel must be 2.6.16-rc5 or newer!"
- fi
-}
-
-src_compile() {
- use debug && append-flags -DDEBUG_TCP -DDEBUG_SCSI
-
- if use modules; then
- einfo "Building kernel modules"
- export KSRC="${KERNEL_DIR}"
- linux-mod_src_compile || die "failed to build modules"
- fi
-
- einfo "Building fwparam_ibft"
- cd "${S}"/utils/fwparam_ibft && \
- CFLAGS="" emake OPTFLAGS="${CFLAGS}" CC="$(tc-getCC)" \
- || die "emake failed"
-
- einfo "Building userspace"
- cd "${S}"/usr && \
- CFLAGS="" emake OPTFLAGS="${CFLAGS}" CC="$(tc-getCC)" \
- || die "emake failed"
-
- if use utils; then
- einfo "Building utils"
- cd "${S}"/utils && \
- CFLAGS="" emake OPTFLAGS="${CFLAGS}" CC="$(tc-getCC)" \
- || die "emake failed"
- fi
-}
-
-src_install() {
- if use modules; then
- einfo "Installing kernel modules"
- export KSRC="${KERNEL_DIR}"
- linux-mod_src_install
- fi
-
- einfo "Installing userspace"
- dosbin usr/iscsid usr/iscsiadm usr/iscsistart
-
- if use utils; then
- einfo "Installing utilities"
- dosbin utils/iscsi-iname utils/iscsi_discovery
- fi
-
- einfo "Installing docs"
- doman doc/*[1-8]
- dodoc README THANKS
- docinto test
- dodoc test/*
-
- einfo "Installing configuration"
- insinto /etc/iscsi
- doins etc/iscsid.conf
- doins "${FILESDIR}"/initiatorname.iscsi
- insinto /etc/conf.d
- newins "${FILESDIR}"/iscsid-${PV}.conf.d iscsid
- newinitd "${FILESDIR}"/iscsid-${PV}.init.d-r1 iscsid
-
- keepdir /var/db/iscsi
- fperms 700 /var/db/iscsi
- fperms 600 /etc/iscsi/iscsid.conf
-}
-
-pkg_postinst() {
- linux-mod_pkg_postinst
-}
diff --git a/sys-block/open-iscsi/open-iscsi-2.0.868_rc1.ebuild b/sys-block/open-iscsi/open-iscsi-2.0.870.3.ebuild
index 2850f8d879b6..216fed44c8b6 100644
--- a/sys-block/open-iscsi/open-iscsi-2.0.868_rc1.ebuild
+++ b/sys-block/open-iscsi/open-iscsi-2.0.870.3.ebuild
@@ -1,13 +1,12 @@
-# Copyright 1999-2008 Gentoo Foundation
+# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-block/open-iscsi/open-iscsi-2.0.868_rc1.ebuild,v 1.1 2008/03/25 02:33:03 kingtaco Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-block/open-iscsi/open-iscsi-2.0.870.3.ebuild,v 1.1 2009/03/20 16:23:49 dertobi123 Exp $
inherit versionator linux-mod eutils flag-o-matic
DESCRIPTION="Open-iSCSI is a high performance, transport independent, multi-platform implementation of RFC3720"
HOMEPAGE="http://www.open-iscsi.org/"
-MY_PV="$(replace_all_version_separators '-')"
-MY_PV="${PN}-$(replace_version_separator 1 "." $MY_PV)"
+MY_PV="${PN}-$(replace_version_separator 2 "-" $MY_PV)"
SRC_URI="http://www.open-iscsi.org/bits/${MY_PV}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
@@ -86,10 +85,27 @@ src_install() {
einfo "Installing configuration"
insinto /etc/iscsi
doins etc/iscsid.conf
- doins "${FILESDIR}"/initiatorname.iscsi
+
+ # only contains iscsi initiatorname, no need to update
+ if [ ! -e /etc/iscsi/initiatorname.iscsi ]; then
+ doins "${FILESDIR}"/initiatorname.iscsi
+ fi
+
+ # if there is a special conf.d for this version, use it
+ # otherwise, use the default: iscsid-conf.d
insinto /etc/conf.d
- newins "${FILESDIR}"/iscsid-${PV}.conf.d iscsid
- newinitd "${FILESDIR}"/iscsid-${PV}.init.d iscsid
+ if [ -e "${FILESDIR}"/iscsid-${PV}.conf.d ]; then
+ newins "${FILESDIR}"/iscsid-${PV}.conf.d iscsid
+ else
+ newins "${FILESDIR}"/iscsid-conf.d iscsid
+ fi
+
+ # same for init.d
+ if [ -e "${FILESDIR}"/iscsid-${PV}.init.d ]; then
+ newinitd "${FILESDIR}"/iscsid-${PV}.init.d iscsid
+ else
+ newinitd "${FILESDIR}"/iscsid-init.d iscsid
+ fi
keepdir /var/db/iscsi
fperms 700 /var/db/iscsi
diff --git a/sys-block/open-iscsi/open-iscsi-2.0.870.ebuild b/sys-block/open-iscsi/open-iscsi-2.0.870.ebuild
deleted file mode 100644
index 064cd2ea01b3..000000000000
--- a/sys-block/open-iscsi/open-iscsi-2.0.870.ebuild
+++ /dev/null
@@ -1,100 +0,0 @@
-# Copyright 1999-2008 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-block/open-iscsi/open-iscsi-2.0.870.ebuild,v 1.1 2008/11/17 20:58:44 dertobi123 Exp $
-
-inherit versionator linux-mod eutils flag-o-matic toolchain-funcs
-
-DESCRIPTION="Open-iSCSI is a high performance, transport independent, multi-platform implementation of RFC3720"
-HOMEPAGE="http://www.open-iscsi.org/"
-MY_PV="${PN}-$(replace_version_separator 2 "-" $MY_PV)"
-SRC_URI="http://www.open-iscsi.org/bits/${MY_PV}.tar.gz"
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~x86 ~amd64 ~ppc ~mips"
-IUSE="modules utils debug"
-DEPEND="virtual/libc
- virtual/linux-sources"
-RDEPEND="${DEPEND}
- virtual/modutils
- sys-apps/util-linux"
-
-S="${WORKDIR}/${MY_PV}"
-
-MODULE_NAMES_ARG="kernel/drivers/scsi:${S}/kernel"
-MODULE_NAMES="iscsi_tcp(${MODULE_NAMES_ARG}) scsi_transport_iscsi(${MODULE_NAMES_ARG}) libiscsi(${MODULE_NAMES_ARG})"
-BUILD_TARGETS="all"
-CONFIG_CHECK="CRYPTO_CRC32C"
-ERROR_CFG="open-iscsi needs CRC32C support in your kernel."
-
-src_unpack() {
- unpack ${A}
- export EPATCH_OPTS="-d${S}"
- if [ $KV_PATCH -lt 15 ]; then
- die "Sorry, your kernel must be 2.6.16-rc5 or newer!"
- fi
-}
-
-src_compile() {
- use debug && append-flags -DDEBUG_TCP -DDEBUG_SCSI
-
- if use modules; then
- einfo "Building kernel modules"
- export KSRC="${KERNEL_DIR}"
- linux-mod_src_compile || die "failed to build modules"
- fi
-
- einfo "Building fwparam_ibft"
- cd "${S}"/utils/fwparam_ibft && \
- CFLAGS="" emake OPTFLAGS="${CFLAGS}" CC="$(tc-getCC)" \
- || die "emake failed"
-
- einfo "Building userspace"
- cd "${S}"/usr && \
- CFLAGS="" emake OPTFLAGS="${CFLAGS}" CC="$(tc-getCC)" \
- || die "emake failed"
-
- if use utils; then
- einfo "Building utils"
- cd "${S}"/utils && \
- CFLAGS="" emake OPTFLAGS="${CFLAGS}" CC="$(tc-getCC)" \
- || die "emake failed"
- fi
-}
-
-src_install() {
- if use modules; then
- einfo "Installing kernel modules"
- export KSRC="${KERNEL_DIR}"
- linux-mod_src_install
- fi
-
- einfo "Installing userspace"
- dosbin usr/iscsid usr/iscsiadm usr/iscsistart
-
- if use utils; then
- einfo "Installing utilities"
- dosbin utils/iscsi-iname utils/iscsi_discovery
- fi
-
- einfo "Installing docs"
- doman doc/*[1-8]
- dodoc README THANKS
- docinto test
- dodoc test/*
-
- einfo "Installing configuration"
- insinto /etc/iscsi
- doins etc/iscsid.conf
- doins "${FILESDIR}"/initiatorname.iscsi
- insinto /etc/conf.d
- newins "${FILESDIR}"/iscsid-${PV}.conf.d iscsid
- newinitd "${FILESDIR}"/iscsid-${PV}.init.d iscsid
-
- keepdir /var/db/iscsi
- fperms 700 /var/db/iscsi
- fperms 600 /etc/iscsi/iscsid.conf
-}
-
-pkg_postinst() {
- linux-mod_pkg_postinst
-}