From 5933fbef26ffbc8140248ffb28957f36a813054b Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Tue, 17 Dec 2013 10:50:09 +0000 Subject: run-postinsts: Add systemd service file This patch mainly adds a systmd service file for run-postinsts, which is started at first boot to run the post-install scripts. Apart from this, this patch also modifies the installation location of run-postinsts to ${sbindir}. This is because this script would be used by both sysvinit and systemd based images. So it's more reasonable to make it locate under ${sbindir}. [YOCTO #5719] Signed-off-by: Chen Qi Signed-off-by: Saul Wold --- .../run-postinsts/run-postinsts/run-postinsts.init | 3 +++ .../run-postinsts/run-postinsts/run-postinsts.service | 17 +++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.init create mode 100644 meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service (limited to 'meta/recipes-devtools/run-postinsts/run-postinsts') diff --git a/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.init b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.init new file mode 100644 index 0000000000..473a1f7f6a --- /dev/null +++ b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.init @@ -0,0 +1,3 @@ +#!/bin/sh + +run-postinsts diff --git a/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service new file mode 100644 index 0000000000..822327aadc --- /dev/null +++ b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service @@ -0,0 +1,17 @@ +[Unit] +Description=Run pending postinsts +DefaultDependencies=no +After=systemd-remount-fs.service systemd-tmpfiles-setup.service tmp.mount +Before=sysinit.target +ConditionPathExistsGlob=#SYSCONFDIR#/*-postinsts + +[Service] +Type=oneshot +ExecStart=#SBINDIR#/run-postinsts +ExecStartPost=#BASE_BINDIR#/systemctl disable run-postinsts.service +RemainAfterExit=No +TimeoutSec=0 + +[Install] +WantedBy=basic.target +WantedBy=sysinit.target -- cgit 1.2.3-korg