]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | #!/usr/bin/env bash |
2 | ||
3 | set -xe | |
4 | ||
5 | pid="$1" | |
6 | ||
7 | if [[ -z "$pid" ]]; then | |
8 | echo "usage: $0 pid" | |
9 | exit 1 | |
10 | fi | |
11 | ||
12 | # delete any existing temporary iscsi.conf files | |
11fdf7f2 | 13 | rm -f /tmp/iscsi.conf* |
7c673cae FG |
14 | |
15 | kill -USR1 "$pid" | |
16 | ||
11fdf7f2 | 17 | if [ ! -f $(ls /tmp/iscsi.conf.*) ]; then |
7c673cae FG |
18 | echo "iscsi_tgt did not generate config file" |
19 | exit 1 | |
20 | fi | |
21 | ||
11fdf7f2 | 22 | mv $(ls /tmp/iscsi.conf.*) /tmp/iscsi.conf |