[meta-virtualization] [PATCH] initscripts: add warning and begin functions to lsb_log_message

Bruce Ashfield bruce.ashfield at windriver.com
Tue Oct 29 20:05:22 PDT 2013


On 13-10-29 4:40 PM, Paul Barrette wrote:
> Some init scripts call a "begin" or "warning" function to log early init
> phase messages, e.g. openvswitch-controller.  These functions are not
> part of the default /etc/init.d/functions script, which is provided by
> oe-core's lsb pkg.  Append these two missing commands to
> /etc/init.d/functions during the install phase.
>
> Signed-off-by: Paul Barrette <paul.barrette at windriver.com>
> ---
>   recipes-core/initscripts/initscripts_1.0.bbappend | 6 ++++++
>   1 file changed, 6 insertions(+)
>
> diff --git a/recipes-core/initscripts/initscripts_1.0.bbappend b/recipes-core/initscripts/initscripts_1.0.bbappend
> index 04d848d..02b5bc4 100644
> --- a/recipes-core/initscripts/initscripts_1.0.bbappend
> +++ b/recipes-core/initscripts/initscripts_1.0.bbappend
> @@ -7,4 +7,10 @@ do_install_append() {
>   	echo failure \(\) \{  >> ${D}${sysconfdir}/init.d/functions
>   	echo \ \ \ \ echo \$* >> ${D}${sysconfdir}/init.d/functions
>   	echo \}               >> ${D}${sysconfdir}/init.d/functions
> +	echo warning \(\) \{  >> ${D}${sysconfdir}/init.d/functions
> +	echo \ \ \ \ echo \$* >> ${D}${sysconfdir}/init.d/functions
> +	echo \}               >> ${D}${sysconfdir}/init.d/functions
> +	echo begin \(\) \{  >> ${D}${sysconfdir}/init.d/functions

You didn't go the extra mile and line up that new ">>" !! :)

I've run into these myself, and actually hacked the initscript to avoid
issues .. but I like this better. So I'm just going to go ahead and merge
this right away.

Bruce



> +	echo \ \ \ \ echo \$* >> ${D}${sysconfdir}/init.d/functions
> +	echo \}
>   }




More information about the meta-virtualization mailing list