aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>2018-07-07 22:32:37 +0530
committerBruce Ashfield <bruce.ashfield@windriver.com>2018-07-10 09:52:47 -0400
commit9aa6b5dcbacf734a93602515f0b1857b91c1d408 (patch)
tree569941cc8580147c302d4c19a7d9e74f4f1be1e1
parent62f3fed67f8cf07de5e342f57e4faf911f001c12 (diff)
downloadmeta-cloud-services-9aa6b5dcbacf734a93602515f0b1857b91c1d408.tar.gz
meta-cloud-services-9aa6b5dcbacf734a93602515f0b1857b91c1d408.tar.bz2
meta-cloud-services-9aa6b5dcbacf734a93602515f0b1857b91c1d408.zip
tgt: Use return instead of exit to restart tgtd, if tgtd is not runningsumorocko
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.init4
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 52d98c3..5937ff0 100644
--- a/meta-openstack/recipes-support/tgt/files/tgtd.init
+++ b/meta-openstack/recipes-support/tgt/files/tgtd.init
@@ -57,11 +57,11 @@ stop ()
RETVAL=$?
if [ "$RETVAL" -eq 107 ] ; then
if [ "$TASK" != "restart" ] ; then
- exit 1
+ return 1
fi
elif [ "$RETVAL" -ne 0 ] ; then
echo "Some initiators are still connected - could not stop tgtd"
- exit 2
+ return 2
fi
echo -n
}