Add init scripts and make a link for sendmail
cover Add init scripts and make a link for sendmail
From: Xiaofeng Yan <[email protected]>
I Add init-functios to lsb-image because LSB Test suite need init scripts. And I make a link for sendmail because LSB Test Suite need it.
Pull URL: git://git.pokylinux.org/poky-contrib.git
Branch: xiaofeng/lsb
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=xiaofeng/lsb
Thanks,
Xiaofeng Yan <[email protected]>
---
Xiaofeng Yan (3):
wq!lsb: Add init-functions to lsb-image
init-functions: Conforming applications may install one or more
initialization scripts
lsbsetup: Add link for sendmail
meta/recipes-extended/lsb/lsb/init-functions | 32 +++++++++++++++++ meta/recipes-extended/lsb/lsb/lsb_killproc | 6 +++ meta/recipes-extended/lsb/lsb/lsb_log_message | 27 ++++++++++++++ meta/recipes-extended/lsb/lsb/lsb_pidofproc | 6 +++ meta/recipes-extended/lsb/lsb/lsb_start_daemon | 45 ++++++++++++++++++++++++ meta/recipes-extended/lsb/lsb_1.4.bb | 39 +++++++++++++------- meta/recipes-extended/lsb/lsbsetup_0.9.bb | 1 + 7 files changed, 142 insertions(+), 14 deletions(-) create mode 100755 meta/recipes-extended/lsb/lsb/init-functions create mode 100755 meta/recipes-extended/lsb/lsb/lsb_killproc create mode 100755 meta/recipes-extended/lsb/lsb/lsb_log_message create mode 100755 meta/recipes-extended/lsb/lsb/lsb_pidofproc create mode 100755 meta/recipes-extended/lsb/lsb/lsb_start_daemon
PATCH 1/3 wq!lsb: Add init-functions to lsb-image
From: Xiaofeng Yan <[email protected]>
init-functions is needed by LSB Test Suite.
--- meta/recipes-extended/lsb/lsb_1.4.bb | 39 +++++++++++++++++++++------------ 1 files changed, 25 insertions(+), 14 deletions(-)
meta/recipes-extended/lsb/lsb_1.4.bb +25 -14
@@ -7,7 +7,13 @@ PR = "r0" LIC_FILES_CHKSUM = "file://README;md5=12da544b1a3a5a1795a21160b49471cf" -SRC_URI = "${SOURCEFORGE_MIRROR}/project/lsb/lsb_release/${PV}/lsb-release-${PV}.tar.gz" +SRC_URI = "${SOURCEFORGE_MIRROR}/project/lsb/lsb_release/${PV}/lsb-release-${PV}.tar.gz \ + file://init-functions \ + file://lsb_killproc \ + file://lsb_log_message \ + file://lsb_pidofproc \ + file://lsb_start_daemon \ + " SRC_URI[md5sum] = "30537ef5a01e0ca94b7b8eb6a36bb1e4" SRC_URI[sha256sum] = "99321288f8d62e7a1d485b7c6bdccf06766fb8ca603c6195806e4457fdf17172"
@@ -18,45 +24,50 @@ do_install(){ mkdir -p ${D}/bin mkdir -p ${D}/lib mkdir -p ${D}/etc/lsb-release.d - echo -n "LSB_VERSION=\"core-2.0-noarch:core-3.2-noarch:core-4.0-noarch:" > ${D}/etc/lsb-release + echo -n "LSB_VERSION=\"core-4.1-noarch:" > ${D}/etc/lsb-release if [ "${TARGET_ARCH}" == "i586" ];then - echo -n "core-2.0-ia32:core-3.2-ia32:core-4.0-ia32" >> ${D}/etc/lsb-release + echo -n "core-4.1-ia32" >> ${D}/etc/lsb-release else - echo -n "core-2.0-${TARGET_ARCH}:core-3.2-${TARGET_ARCH}:core-4.0-${TARGET_ARCH}" >> ${D}/etc/lsb-release + echo -n "core-4.1-${TARGET_ARCH}" >> ${D}/etc/lsb-release fi echo "\"" >> ${D}/etc/lsb-release if [ "${TARGET_ARCH}" == "i586" ];then mkdir -p ${D}/etc/lsb-release.d - touch ${D}/etc/lsb-release.d/graphics-2.0-noarch - touch ${D}/etc/lsb-release.d/graphics-3.2-noarch + touch ${D}/etc/lsb-release.d/graphics-4.1-noarch touch ${D}/etc/lsb-release.d/graphics-${PV}-noarch touch ${D}/etc/lsb-release.d/desktop-${PV}-noarch - touch ${D}/etc/lsb-release.d/graphics-2.0-ia32 - touch ${D}/etc/lsb-release.d/graphics-3.2-ia32 + touch ${D}/etc/lsb-release.d/graphics-4.1-ia32 touch ${D}/etc/lsb-release.d/graphics-${PV}-ia32 touch ${D}/etc/lsb-release.d/desktop-${PV}-ia32 elif [ "${TARGET_ARCH}" == "x86_64" ];then - touch ${D}/etc/lsb-release.d/graphics-2.0-amd64 - touch ${D}/etc/lsb-release.d/graphics-3.2-amd64 + touch ${D}/etc/lsb-release.d/graphics-4.1-noarch + touch ${D}/etc/lsb-release.d/graphics-4.1-amd64 touch ${D}/etc/lsb-release.d/graphics-${PV}-amd64 touch ${D}/etc/lsb-release.d/desktop-${PV}-amd64 fi if [ "${TARGET_ARCH}" = "powerpc" ];then - touch ${D}/etc/lsb-release.d/graphics-2.0-ppc32 - touch ${D}/etc/lsb-release.d/graphics-3.2-ppc32 + touch ${D}/etc/lsb-release.d/graphics-4.1-noarch + touch ${D}/etc/lsb-release.d/graphics-4.1-ppc32 touch ${D}/etc/lsb-release.d/graphics-${PV}-ppc32 touch ${D}/etc/lsb-release.d/desktop-${PV}-ppc32 elif [ "${TARGET_ARCH}" = "powerpc64" ];then - touch ${D}/etc/lsb-release.d/graphics-2.0-ppc64 - touch ${D}/etc/lsb-release.d/graphics-3.2-ppc64 + touch ${D}/etc/lsb-release.d/graphics-4.1-noarch + touch ${D}/etc/lsb-release.d/graphics-4.1-ppc64 touch ${D}/etc/lsb-release.d/graphics-${PV}-ppc64 touch ${D}/etc/lsb-release.d/desktop-${PV}-ppc64 fi } do_install_append(){ + install -d ${D}/etc/core-lsb + install -d ${D}/lib/lsb + for i in lsb_killproc lsb_log_message lsb_pidofproc lsb_start_daemon + do + install -m 0755 ${WORKDIR}/${i} ${D}/etc/core-lsb + done + install -m 0755 ${WORKDIR}/init-functions ${D}/lib/lsb if [ "${TARGET_ARCH}" == "x86_64" ];then cd ${D} ln -sf lib lib64
Signature · 1 line
1.7.0.4
PATCH 2/3 init-functions: Conforming applications may install one or more initialization scripts
In reply to Xiaofeng YanFrom: Xiaofeng Yan <[email protected]>
LSB Test Suite need init scripts for lsb-image.
During the installer's post-install processing phase the program /usr/lib/lsb/install_initd \
must be called to activate the init script. \
When a software package is removed, /usr/lib/lsb/remove_initd \
must be called to deactivate the init script.
--- meta/recipes-extended/lsb/lsb/init-functions | 32 +++++++++++++++++ meta/recipes-extended/lsb/lsb/lsb_killproc | 6 +++ meta/recipes-extended/lsb/lsb/lsb_log_message | 27 ++++++++++++++ meta/recipes-extended/lsb/lsb/lsb_pidofproc | 6 +++ meta/recipes-extended/lsb/lsb/lsb_start_daemon | 45 ++++++++++++++++++++++++ 5 files changed, 116 insertions(+), 0 deletions(-) create mode 100755 meta/recipes-extended/lsb/lsb/init-functions create mode 100755 meta/recipes-extended/lsb/lsb/lsb_killproc create mode 100755 meta/recipes-extended/lsb/lsb/lsb_log_message create mode 100755 meta/recipes-extended/lsb/lsb/lsb_pidofproc create mode 100755 meta/recipes-extended/lsb/lsb/lsb_start_daemon
meta/recipes-extended/lsb/lsb/init-functions new file +32 -0
@@ -0,0 +1,32 @@ +#!/bin/sh + +# LSB initscript functions, as defined in the LSB Spec 1.1.0 +# +# Lawrence Lim <[email protected]> - Tue, 26 June 2007 +# Updated to the latest LSB 3.1 spec +# http://refspecs.freestandards.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic_lines.txt + +start_daemon () { + /etc/core-lsb/lsb_start_daemon "$@" +} + +killproc () { + /etc/core-lsb/lsb_killproc "$@" +} + +pidofproc () { + /etc/core-lsb/lsb_pidofproc "$@" +} + +log_success_msg () { + /etc/core-lsb/lsb_log_message success "$@" +} + +log_failure_msg () { + /etc/core-lsb/lsb_log_message failure "$@" +} + +log_warning_msg () { + /etc/core-lsb/lsb_log_message warning "$@" +} +
meta/recipes-extended/lsb/lsb/lsb_killproc new file +6 -0
@@ -0,0 +1,6 @@ +#!/bin/bash + +. /etc/init.d/functions + +LSB=LSB-1.1 killproc $* +exit $?
meta/recipes-extended/lsb/lsb/lsb_log_message new file +27 -0
@@ -0,0 +1,27 @@ +#!/bin/bash + +. /etc/init.d/functions + +ACTION=$1 +shift + +case "$ACTION" in + success) + echo -n $* + success "$*" + echo + ;; + failure) + echo -n $* + failure "$*" + echo + ;; + warning) + echo -n $* + warning "$*" + echo + ;; + *) + ;; +esac +exit 0
meta/recipes-extended/lsb/lsb/lsb_pidofproc new file +6 -0
@@ -0,0 +1,6 @@ +#!/bin/bash + +. /etc/init.d/functions + +pidofproc $* +exit $?
meta/recipes-extended/lsb/lsb/lsb_start_daemon new file +45 -0
45 lines not on this page · raw message
Signature · 1 line
1.7.0.4
PATCH 3/3 lsbsetup: Add link for sendmail
In reply to Xiaofeng YanFrom: Xiaofeng Yan <[email protected]>
Link /sbin/sendmail/ to /usr/lib/sendmail
--- meta/recipes-extended/lsb/lsbsetup_0.9.bb | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
meta/recipes-extended/lsb/lsbsetup_0.9.bb +1 -0
@@ -17,6 +17,7 @@ do_install() { install -d ${D}/usr/lib/lsb ln -sf ${base_sbindir}/chkconfig ${D}/${libdir}/lsb/install_initd ln -sf ${base_sbindir}/chkconfig ${D}/${libdir}/lsb/remove_initd + ln -sf ${base_sbindir}/sendmail ${D}/${libdir}/lsb/sendmail } FILES_${PN} += "${libdir}/lsb"
Signature · 1 line
1.7.0.4
Richard Purdie
AppliedQuoted 14 lines · Xiaofeng Yan
From: Xiaofeng Yan <[email protected]>
I Add init-functios to lsb-image because LSB Test suite need init scripts. And I make a link for sendmail because LSB Test Suite need it.
Pull URL:
git://git.pokylinux.org/poky-contrib.git
Branch: xiaofeng/lsb
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=xiaofeng/lsbThanks,
Xiaofeng Yan <[email protected]>
---
Quoted 5 lines
Xiaofeng Yan (3):
wq!lsb: Add init-functions to lsb-image
init-functions: Conforming applications may install one or more
initialization scripts
lsbsetup: Add link for sendmail
Merged to master, thanks.
Richard