summaryrefslogtreecommitdiffstats
path: root/src/spdk/test/iscsi_tgt/fio/running_config.sh
blob: ea59eb5a141c872cc0d09c38e7a0f158e4fc90da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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