Return-Path: Received: from mail1.windriver.com (mail1.windriver.com [147.11.146.13]) by mail.openembedded.org (Postfix) with ESMTP id AB4C1600BB for ; Wed, 28 Sep 2016 08:36:31 +0000 (UTC) Received: from ALA-HCB.corp.ad.wrs.com (ala-hcb.corp.ad.wrs.com [147.11.189.41]) by mail1.windriver.com (8.15.2/8.15.1) with ESMTPS id u8S8aWAH021675 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL) for ; Wed, 28 Sep 2016 01:36:33 -0700 (PDT) Received: from pek-lpgtest20.wrs.com (128.224.179.28) by ALA-HCB.corp.ad.wrs.com (147.11.189.41) with Microsoft SMTP Server id 14.3.294.0; Wed, 28 Sep 2016 01:36:31 -0700 From: Dengke Du To: Date: Wed, 28 Sep 2016 16:36:26 +0800 Message-ID: <1475051786-117691-1-git-send-email-dengke.du@windriver.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Subject: [meta-oe][PATCH V2] edac-utils: add systemd support and required dependencies for edac X-BeenThere: openembedded-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Using the OpenEmbedded metadata to build Distributions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Sep 2016 08:36:37 -0000 Content-Type: text/plain Changed in V2: Change the title to eliminate confused. Add systemd unit files for edac-utils. Signed-off-by: Dengke Du --- meta-oe/recipes-support/edac-utils/edac-utils_git.bb | 14 +++++++++++++- meta-oe/recipes-support/edac-utils/files/edac.service | 11 +++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-support/edac-utils/files/edac.service diff --git a/meta-oe/recipes-support/edac-utils/edac-utils_git.bb b/meta-oe/recipes-support/edac-utils/edac-utils_git.bb index c0ad665..b3ff1cc 100644 --- a/meta-oe/recipes-support/edac-utils/edac-utils_git.bb +++ b/meta-oe/recipes-support/edac-utils/edac-utils_git.bb @@ -14,9 +14,10 @@ S = "${WORKDIR}/git" SRC_URI = "git://github.com/grondo/edac-utils \ file://make-init-script-be-able-to-automatically-load-EDAC-.patch \ file://add-restart-to-initscript.patch \ + file://edac.service \ " -inherit autotools-brokensep +inherit autotools-brokensep systemd do_configure_prepend () { touch ${S}/ChangeLog @@ -31,4 +32,15 @@ RDEPENDS_${PN}_powerpc = "dmidecode" RDEPENDS_${PN}_powerpc64 = "dmidecode" RDEPENDS_${PN}_append = " \ perl-module-file-basename perl-module-file-find perl-module-getopt-long perl-module-posix \ + perl-module-overload \ + perl-module-overloading \ + perl-module-file-glob \ " + +do_install_append() { + install -d ${D}${systemd_unitdir}/system + install -m 644 ${WORKDIR}/edac.service ${D}/${systemd_unitdir}/system + sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}/${systemd_unitdir}/system/edac.service +} + +SYSTEMD_SERVICE_${PN} = "edac.service" diff --git a/meta-oe/recipes-support/edac-utils/files/edac.service b/meta-oe/recipes-support/edac-utils/files/edac.service new file mode 100644 index 0000000..9f687a8 --- /dev/null +++ b/meta-oe/recipes-support/edac-utils/files/edac.service @@ -0,0 +1,11 @@ +[Unit] +Description=Initialize EDAC Drivers For Machine Hardware + +[Service] +Type=oneshot +ExecStart=@SBINDIR@/edac-ctl --register-labels +ExecStop=@SBINDIR@/edac-ctl --unload +RemainAfterExit=yes + +[Install] +WantedBy=multi-user.target -- 2.7.4