da414d766f
We already know the PID of the iscsi_tgt process since we launched it ourselves; drop the use of the pidfile. Change-Id: Ib1569c5b507ac85f26020937a007f5d7df090d99 Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
23 lines
334 B
Bash
Executable File
23 lines
334 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -xe
|
|
|
|
pid="$1"
|
|
|
|
if [[ -z "$pid" ]]; then
|
|
echo "usage: $0 pid"
|
|
exit 1
|
|
fi
|
|
|
|
# delete any existing temporary iscsi.conf files
|
|
rm -f /tmp/iscsi.conf.*
|
|
|
|
kill -USR1 "$pid"
|
|
|
|
if [ ! -f `ls /tmp/iscsi.conf.*` ]; then
|
|
echo "iscsi_tgt did not generate config file"
|
|
exit 1
|
|
fi
|
|
|
|
mv `ls /tmp/iscsi.conf.*` /tmp/iscsi.conf
|