diff options
| -rw-r--r-- | meta-openstack/recipes-support/tgt/files/tgtd.init | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/meta-openstack/recipes-support/tgt/files/tgtd.init b/meta-openstack/recipes-support/tgt/files/tgtd.init index 8c07926..52d98c3 100644 --- a/meta-openstack/recipes-support/tgt/files/tgtd.init +++ b/meta-openstack/recipes-support/tgt/files/tgtd.init | |||
| @@ -17,6 +17,15 @@ TGTD_CONFIG=/etc/tgt/targets.conf | |||
| 17 | start () | 17 | start () |
| 18 | { | 18 | { |
| 19 | echo -n "Starting $DESC..." | 19 | echo -n "Starting $DESC..." |
| 20 | |||
| 21 | # Ensure service isn't running | ||
| 22 | tgt-admin -s >/dev/null 2>&1 | ||
| 23 | RETVAL=$? | ||
| 24 | if [ "$RETVAL" -ne 107 ] ; then | ||
| 25 | echo "$DESC is already running." | ||
| 26 | exit 1 | ||
| 27 | fi | ||
| 28 | |||
| 20 | # Start tgtd first | 29 | # Start tgtd first |
| 21 | $DAEMON &>/dev/null | 30 | $DAEMON &>/dev/null |
| 22 | RETVAL=$? | 31 | RETVAL=$? |
