[Fuego] [PATCH 2/3] Return error if docker install script fails

Tim.Bird at sony.com Tim.Bird at sony.com
Fri May 4 20:21:18 UTC 2018


Applied and pushed.

thanks.
 -- Tim


> -----Original Message-----
> From: fuego-bounces at lists.linuxfoundation.org [mailto:fuego-
> bounces at lists.linuxfoundation.org] On Behalf Of Guilherme Campos
> Camargo
> Sent: Wednesday, May 02, 2018 2:27 PM
> To: fuego at lists.linuxfoundation.org
> Subject: [Fuego] [PATCH 2/3] Return error if docker install script fails
> 
> Before this patch, install.sh would return 0 even if
> fuego-host-scripts/docker-build-image.sh (that's sourced in it) failed,
> what could possibly mislead a script or program that depends on its
> return.
> 
> By using 'set -e' we make sure that any failure inside its sourced
> scripts is propagated, aborting the execution and returning the proper
> error code.
> 
> Signed-off-by: Guilherme Campos Camargo <guicc at profusion.mobi>
> ---
>  install.sh | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/install.sh b/install.sh
> index 2193559..6441ff0 100755
> --- a/install.sh
> +++ b/install.sh
> @@ -1,2 +1,6 @@
> +#!/bin/bash
> +
> +set -e
> +
>  source fuego-host-scripts/docker-build-image.sh $1
>  sudo /bin/sh -c "if [ -f /etc/ttc.conf -a ! -f fuego-ro/conf/ttc.conf ] ; then cp
> /etc/ttc.conf fuego-ro/conf/ttc.conf ; fi"
> --
> 2.17.0
> 
> _______________________________________________
> Fuego mailing list
> Fuego at lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/fuego


More information about the Fuego mailing list