initscripts: add warning and begin functions to lsb_log_message
PATCH 1/1 initscripts: add warning and begin functions to lsb_log_message
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.
--- recipes-core/initscripts/initscripts_1.0.bbappend | 6 ++++++ 1 file changed, 6 insertions(+)
recipes-core/initscripts/initscripts_1.0.bbappend +6 -0
@@ -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 + echo \ \ \ \ echo \$* >> ${D}${sysconfdir}/init.d/functions + echo \} }
Signature · 1 line
1.8.1.4
Quoted 16 lines · Paul Barrette
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/functionsscript, which is provided by oe-core's lsb pkg. Append these two missing commands to/etc/init.d/functionsduring the install phase.Signed-off-by Paul Barrette <[email protected]>--- recipes-core/initscripts/initscripts_1.0.bbappend | 6 ++++++ 1 file changed, 6 insertions(+)recipes-core/initscripts/initscripts_1.0.bbappend +0
-0
recipes-core/initscripts/initscripts_1.0.bbappend do_install_append() { · line 13
Quoted 7 lines
recipes-core/initscripts/initscripts_1.0.bbappend +4
-0@@ -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
Quoted 3 lines
recipes-core/initscripts/initscripts_1.0.bbappend +2
-0+ echo \ \ \ \ echo \$* >> ${D}${sysconfdir}/init.d/functions + echo \} }