[meta-virtualization] [m-c-s][master][sumo][rocko][PATCH] tgt: Use return instead of exit to restart tgtd, if tgtd is not running
Bruce Ashfield
bruce.ashfield at gmail.com
Tue Jul 10 06:54:47 PDT 2018
merged
Bruce
On Sat, Jul 7, 2018 at 1:02 PM, Jagadeesh Krishnanjanappa
<jkrishnanjanappa at mvista.com> wrote:
> 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 at mvista.com>
> ---
> meta-openstack/recipes-support/tgt/files/tgtd.init | 4 ++--
> 1 file 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 ()
> 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
> }
> --
> 2.7.4
>
> --
> _______________________________________________
> meta-virtualization mailing list
> meta-virtualization at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-virtualization
--
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"
More information about the meta-virtualization
mailing list