#!/bin/tcsh
#
#	ini-lun1-up
#
#	vi: set autoindent tabstop=4 shiftwidth=4 :
#
#	bring up lun 1 in existing session in initiator
#
if ( ! -e /proc/scsi/iscsi_initiator ) then
	echo "/proc/scsi/iscsi_initiator does not exist"
	echo "load the initiator module with ini-install"
	exit 1
endif
#
foreach hostno (/proc/scsi/iscsi_initiator/*)
	if ( ! -f $hostno ) continue
	set hostno = $hostno:t
#
iscsi_config up ip=127.0.0.1 host=$hostno lun=1
