numam-spdk/test/iscsi_tgt/fio/running_config.sh
Daniel Verkamp da414d766f test/iscsi_tgt/fio: pass pid to running_config
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>
2017-02-17 11:00:12 -07:00

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