All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kang Kai <kai.kang@windriver.com>
To: <sgw@linux.intel.com>
Cc: Zhenfeng.Zhao@windriver.com, openembedded-core@lists.openembedded.org
Subject: [PATCH 1/2] initscripts: use update-alternative to handle file functions
Date: Thu, 28 Jun 2012 17:35:56 +0800	[thread overview]
Message-ID: <4460a45a7ab14ef1075dd5a1ba27075e11d036b7.1340873279.git.kai.kang@windriver.com> (raw)
In-Reply-To: <cover.1340873279.git.kai.kang@windriver.com>

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.

Signed-off-by: Kang Kai <kai.kang@windriver.com>
---
 meta/recipes-core/initscripts/initscripts_1.0.bb |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/initscripts/initscripts_1.0.bb b/meta/recipes-core/initscripts/initscripts_1.0.bb
index 829694b..78c27a3 100644
--- a/meta/recipes-core/initscripts/initscripts_1.0.bb
+++ b/meta/recipes-core/initscripts/initscripts_1.0.bb
@@ -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() {
@@ -60,7 +66,7 @@ do_install () {
 	install -d ${D}${sysconfdir}/default
 	install -d ${D}${sysconfdir}/default/volatiles
 
-	install -m 0644    ${WORKDIR}/functions		${D}${sysconfdir}/init.d
+	install -m 0644    ${WORKDIR}/functions		${D}${sysconfdir}/init.d/functions.${BPN}
 	install -m 0755    ${WORKDIR}/bootmisc.sh	${D}${sysconfdir}/init.d
 	install -m 0755    ${WORKDIR}/checkroot.sh	${D}${sysconfdir}/init.d
 #	install -m 0755    ${WORKDIR}/finish.sh		${D}${sysconfdir}/init.d
-- 
1.7.5.4




  reply	other threads:[~2012-06-28  9:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-28  9:35 [PATCH 0/2] Fix lsbinitscripts link problem Kang Kai
2012-06-28  9:35 ` Kang Kai [this message]
2012-07-03 13:53   ` [PATCH 1/2] initscripts: use update-alternative to handle file functions Richard Purdie
2012-06-28  9:35 ` [PATCH 2/2] lsbinitscripts: Add a linking for functions.lsbinitscripts Kang Kai
2012-07-07  0:43   ` Saul Wold
2012-07-09  1:33     ` Kang Kai
2012-07-03  1:42 ` [PATCH 0/2] Fix lsbinitscripts link problem Kang Kai
2012-07-03  4:04   ` Saul Wold
2012-07-03  5:49     ` Kang Kai
2012-07-09  2:26 [PATCH 0/2] V3: " Kang Kai
2012-07-09  2:26 ` [PATCH 1/2] initscripts: use update-alternative to handle file functions Kang Kai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4460a45a7ab14ef1075dd5a1ba27075e11d036b7.1340873279.git.kai.kang@windriver.com \
    --to=kai.kang@windriver.com \
    --cc=Zhenfeng.Zhao@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=sgw@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.