initscripts: use update-alternative to handle file functions
authorKang Kai <kai.kang@windriver.com>
Mon, 9 Jul 2012 02:26:58 +0000 (10:26 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 9 Jul 2012 10:38:01 +0000 (11:38 +0100)
lsb need a more abundant /etc/init.d/functions file to handle lsb test.
Use update-alternative to install file funtions in package initscripts,
when package lsbinitscripts installed the file functions of
lsbinitscripts will be used.

(From OE-Core rev: 478f821462665a9dc6f1755059cdbf642aebbf4d)

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/initscripts/initscripts_1.0.bb

index 829694b..1d80c55 100644 (file)
@@ -3,7 +3,7 @@ DESCRIPTION = "Initscripts provide the basic system startup initialization scrip
 SECTION = "base"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-PR = "r134"
+PR = "r135"
 
 INHIBIT_DEFAULT_DEPS = "1"
 
@@ -37,6 +37,12 @@ SRC_URI_append_arm = " file://alignment.sh"
 
 KERNEL_VERSION = ""
 
+inherit update-alternatives
+
+ALTERNATIVE_PRIORITY = "90"
+ALTERNATIVE_${PN} = "functions"
+ALTERNATIVE_LINK_NAME[functions] = "${sysconfdir}/init.d/functions"
+
 HALTARGS ?= "-d -f"
 
 do_configure() {