Similar to our NVMf target, this is an iSCSI target that can interoperate with the Linux and Windows standard iSCSI initiators. Change-Id: I6961c5ef99f7b161c396330ed5b543ea29b0ca7b Signed-off-by: Ben Walker <benjamin.walker@intel.com>
26 lines
425 B
Bash
Executable File
26 lines
425 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -xe
|
|
|
|
if [ $EUID -ne 0 ]; then
|
|
echo "$0 must be run as root"
|
|
exit 1
|
|
fi
|
|
|
|
if [ ! -f /var/run/iscsi.pid.0 ]; then
|
|
echo "ids is not running"
|
|
exit 1
|
|
fi
|
|
|
|
# delete any existing temporary iscsi.conf files
|
|
rm -f /tmp/iscsi.conf.*
|
|
|
|
kill -USR1 `cat /var/run/iscsi.pid.0`
|
|
|
|
if [ ! -f `ls /tmp/iscsi.conf.*` ]; then
|
|
echo "ids did not generate config file"
|
|
exit 1
|
|
fi
|
|
|
|
mv `ls /tmp/iscsi.conf.*` /tmp/iscsi.conf
|