]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
initscripts: add function log_success_msg/log_failure_msg/log_warning_msg
authorChangqing Li <changqing.li@windriver.com>
Mon, 28 Apr 2025 05:51:06 +0000 (13:51 +0800)
committerSteve Sakoman <steve@sakoman.com>
Mon, 28 Apr 2025 16:12:44 +0000 (09:12 -0700)
* add function log_success_msg/log_failure_msg/log_warning_msg, some
packages still use these functions, like mariadb, refer [1], without
these function, with sysV init manager, mariadb will report error:

root@qemux86-64:~# /etc/init.d/mysqld status
/etc/init.d/mysqld: line 383: log_success_msg: command not found

* remove RCONFLICTS with lsbinitscripts, LSB support already remove in
  [2]

[1] https://github.com/MariaDB/server/blob/main/support-files/mysql.server.sh#L104
[2] https://git.openembedded.org/openembedded-core/commit/?id=fb064356af615d67d85b65942103bf943d84d290
[3] https://refspecs.linuxbase.org/LSB_4.0.0/LSB-Core-generic/LSB-Core-generic/iniscrptfunc.html

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/recipes-core/initscripts/initscripts-1.0/functions
meta/recipes-core/initscripts/initscripts_1.0.bb

index 35aebd4a554d9b08d0a3f8d640b149e535dbc026..7fc19c808b19f9bb30082f2ed39c7c838f26c814 100755 (executable)
@@ -92,3 +92,24 @@ passed() {
     echo -n -e "${BRACKET}[${SUCCESS} PASS ${BRACKET}]${NORMAL}"
     return $rc
 }
+
+log_success_msg()
+{
+    echo -n $@
+    success
+    echo
+}
+
+log_failure_msg()
+{
+    echo -n $@
+    failure
+    echo
+}
+
+log_warning_msg()
+{
+    echo -n $@
+    warning
+    echo
+}
index e61ac554f3b9f5884fa3b942b8727997edeb1749..56ee65ac5bb7391c604c9c745c642b9b2c182eb5 100644 (file)
@@ -53,7 +53,6 @@ RDEPENDS:${PN} = "initd-functions \
 # Recommend pn-functions so that it will be a preferred default provider for initd-functions
 RRECOMMENDS:${PN} = "${PN}-functions"
 RPROVIDES:${PN}-functions = "initd-functions"
-RCONFLICTS:${PN}-functions = "lsbinitscripts"
 FILES:${PN}-functions = "${sysconfdir}/init.d/functions*"
 FILES:${PN}-sushell = "${base_sbindir}/sushell"