[Fuego] [PATCH] Bugfix: modify the command to start the service of sysvinit.

Wang, Mingyu wangmy at cn.fujitsu.com
Wed Jan 16 03:10:58 UTC 2019


Hi Tim

>I'm applying this patch, as it's an improvement.  But could you do some research and possibly add 
>support for using the 'service' command to fuego_board_function_lib.sh?
About fuego_board_function_lib.sh, including is-active and sysvinit, I will fix it after considering these issues.

by wangmy

-----Original Message-----
From: Tim.Bird at sony.com [mailto:Tim.Bird at sony.com] 
Sent: Wednesday, January 16, 2019 9:49 AM
To: Wang, Mingyu/王 鸣瑜 <wangmy at cn.fujitsu.com>; fuego at lists.linuxfoundation.org
Subject: RE: [Fuego] [PATCH] Bugfix: modify the command to start the service of sysvinit.

Comments below.

> -----Original Message-----
> From: Wang Mingyu
> 
> Signed-off-by: Wang Mingyu <wangmy at cn.fujitsu.com>
> ---
>  engine/scripts/fuego_board_function_lib.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/engine/scripts/fuego_board_function_lib.sh
> b/engine/scripts/fuego_board_function_lib.sh
> index 69ece97..4c29bf3 100644
> --- a/engine/scripts/fuego_board_function_lib.sh
> +++ b/engine/scripts/fuego_board_function_lib.sh
> @@ -45,6 +45,6 @@ exec_service_on_target() {
>      then
>          systemctl $2 $1
>      else
> -        $1 $2
> +        /etc/init.d/$1 $2
>      fi
>  }
> --
> 1.8.3.1

Looks good.  Thanks.

It would be nice, IMHO, to check for the 'service' command, and use that if it is available.  That command is designed specifically to abstract away the differences between raw sysV init scripts and upstart-based systems.
I believe it's supported on Debian-based system and Fedora-based systems, but maybe not on low-end Yocto-Project-based systems (hence the need to check for it before using it.)

I'm applying this patch, as it's an improvement.  But could you do some research and possibly add support for using the 'service' command to fuego_board_function_lib.sh?

Thanks,
 -- Tim







More information about the Fuego mailing list