summaryrefslogtreecommitdiffstats
path: root/src/spdk/test/iscsi_tgt/fio/running_config.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/spdk/test/iscsi_tgt/fio/running_config.sh')
-rwxr-xr-xsrc/spdk/test/iscsi_tgt/fio/running_config.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/spdk/test/iscsi_tgt/fio/running_config.sh b/src/spdk/test/iscsi_tgt/fio/running_config.sh
new file mode 100755
index 00000000..ea59eb5a
--- /dev/null
+++ b/src/spdk/test/iscsi_tgt/fio/running_config.sh
@@ -0,0 +1,22 @@
+#!/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