10–Protocolo iSCSI
Inicio iSCSI
# Required-Stop:
# Should-Stop:
# Default-Start:
# Default-Stop:
# Short-Description: iSCSI initiator daemon root-fs support
# Description:
#
#
### END INIT INFO
ISCSIADM=/sbin/iscsiadm
ISCSIUIO=/sbin/iscsiuio
CONFIG_FILE=/etc/iscsid.conf
DAEMON=/sbin/iscsid
ARGS="-c $CONFIG_FILE"
# Source LSB init functions
. /etc/rc.status
#
# This service is run right after booting. So all targets activated
# during mkinitrd run should not be removed when the open-iscsi
# service is stopped.
#
iscsi_load_iscsiuio()
{
TRANSPORT=`$ISCSIADM -m session 2> /dev/null | grep "bnx2i"`
if [ "$TRANSPORT" ] ; then
echo -n "Launch iscsiuio "
fi
}
iscsi_mark_root_nodes()
{
$ISCSIADM -m session 2> /dev/null | while read t num i target ;
do
ip=${i%%:*}
STARTUP=`$ISCSIADM -m node -p $ip -T $target 2> /dev/null |
grep "node.conn\[0\].startup" | cut -d' ' -f3`
if [ "$STARTUP" -a "$STARTUP" != "onboot" ] ; then
$null
B
Starts the iSCSI initiator daemon if the
root-filesystem is on an iSCSI device
startproc $ISCSIUIO
132
BC0054508-09 M