Skip to contentSkip to conversation

initscripts: add warning and begin functions to lsb_log_message

PATCH In review Paul Barrette 2 participants 2 messages Oct 29, 2013 – Oct 30, 2013

lore
Share & tools
lore
#0 lore raw

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
index 04d848d..02b5bc4 100644
@@ -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
#1 lore raw
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/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 +0 -0
index 04d848d..02b5bc4 100644

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 \}
  }