On Wed, 2012-05-30 at 09:47 +0800, [email protected] wrote:
> From: Xiaofeng Yan <[email protected]>
> 
> The version of initscripts has more functions than the simple. \
> There could be some errors for current initscripts when running \
> some programe because of absent some functions provided by \
> initscripts.
> 
> [YOCTO #2133]
> 
> Signed-off-by: Xiaofeng Yan <[email protected]>
> ---
>  meta/recipes-extended/lsb/lsbinitscripts_9.03.bb |   36 
> ++++++++++++++++++++++
>  1 files changed, 36 insertions(+), 0 deletions(-)
>  create mode 100644 meta/recipes-extended/lsb/lsbinitscripts_9.03.bb
> 
> diff --git a/meta/recipes-extended/lsb/lsbinitscripts_9.03.bb 
> b/meta/recipes-extended/lsb/lsbinitscripts_9.03.bb
> new file mode 100644
> index 0000000..5d2bca8
> --- /dev/null
> +++ b/meta/recipes-extended/lsb/lsbinitscripts_9.03.bb
> @@ -0,0 +1,36 @@
> +DESCRIPTION = "SysV init scripts"

Surely we can be a little more descriptive here and at least mention
LSB?

> +SECTION = "base"
> +LICENSE = "GPLv2"
> +PR = "r0"
> +
> +LIC_FILES_CHKSUM = "file://COPYING;md5=ebf4e8b49780ab187d51bd26aaa022c6"
> +
> +S="${WORKDIR}/initscripts-${PV}"
> +SRC_URI = 
> "http://pkgs.fedoraproject.org/repo/pkgs/initscripts/initscripts-${PV}.tar.bz2/668fa2762b57ef75436303857847bba3/initscripts-${PV}.tar.bz2
>  \
> +           file://functions.patch \
> +          " 
> +
> +SRC_URI[md5sum] = "668fa2762b57ef75436303857847bba3"
> +SRC_URI[sha256sum] = 
> "d56547a68ce223a7413b2676650b042125f047c8d6d139c5b970e118b3dc958a"
> +
> +do_configure[noexec] = "1" 
> +
> +do_install(){
> +     install -d ${D}/etc/init.d/
> +     install -m 0755 ${S}/rc.d/init.d/functions ${D}/etc/init.d/functions
> +        if [ "${PN}" = "lsbinitscripts" ]; then
> +             mv ${D}${sysconfdir}/init.d/functions 
> ${D}${sysconfdir}/init.d/functions.${PN}
> +     fi
> +}
> +
> +pkg_postinst_${PN}(){
> +        if [ "${PN}" = "lsbinitscripts" ]; then
> +             update-alternatives --install  ${sysconfdir}/init.d/functions 
> functions functions.${PN} 10
> +     fi
> +}
> +
> +pkg_prerm_${PN}(){
> +        if [ "${PN}" = "lsbinitscripts" ]; then
> +             update-alternatives --remove functions  
> ${sysconfdir}/init.d/functions.${PN}
> +     fi
> +}

Could you update this to use the recently added update-alternatives
class please?

Cheers,

Richard


_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Reply via email to