diff options
| author | Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com> | 2018-07-07 22:32:37 +0530 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2018-07-10 09:52:29 -0400 |
| commit | 8220a0dca37e4eb6bc8c29bbc98fa74e6bba066a (patch) | |
| tree | a16879c10dccf76dd7518cd262344c6c4567e911 | |
| parent | 898416744a4509883e571b1c1183a808c7d5b28c (diff) | |
| download | meta-cloud-services-8220a0dca37e4eb6bc8c29bbc98fa74e6bba066a.tar.gz | |
tgt: Use return instead of exit to restart tgtd, if tgtd is not running
If the tgtd daemon is stopped, then '/etc/init.d/tgtd.init restart'
does not start the new tgtd daemon, as the control comes out from the
stop function, if it finds tgtd is not running.
Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
| -rw-r--r-- | meta-openstack/recipes-support/tgt/files/tgtd.init | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/meta-openstack/recipes-support/tgt/files/tgtd.init b/meta-openstack/recipes-support/tgt/files/tgtd.init index 350fd0c..4b0ce94 100644 --- a/meta-openstack/recipes-support/tgt/files/tgtd.init +++ b/meta-openstack/recipes-support/tgt/files/tgtd.init | |||
| @@ -57,11 +57,11 @@ stop () | |||
| 57 | RETVAL=$? | 57 | RETVAL=$? |
| 58 | if [ "$RETVAL" -eq 107 ] ; then | 58 | if [ "$RETVAL" -eq 107 ] ; then |
| 59 | if [ "$TASK" != "restart" ] ; then | 59 | if [ "$TASK" != "restart" ] ; then |
| 60 | exit 1 | 60 | return 1 |
| 61 | fi | 61 | fi |
| 62 | elif [ "$RETVAL" -ne 0 ] ; then | 62 | elif [ "$RETVAL" -ne 0 ] ; then |
| 63 | echo "Some initiators are still connected - could not stop tgtd" | 63 | echo "Some initiators are still connected - could not stop tgtd" |
| 64 | exit 2 | 64 | return 2 |
| 65 | fi | 65 | fi |
| 66 | echo -n | 66 | echo -n |
| 67 | } | 67 | } |
