diff options
author | Ross Burton <ross.burton@intel.com> | 2013-12-17 10:50:09 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-01-28 00:52:34 +0000 |
commit | 79f2bb474204b1c33d8c87892f42b3c3b4a20016 (patch) | |
tree | f10134345b4baf460b2eaee2719e3bd5111f9589 /meta/recipes-devtools/run-postinsts/run-postinsts | |
parent | 78484bf45e8052373cbf25f10c380b6e674ef5db (diff) | |
download | poky-79f2bb474204b1c33d8c87892f42b3c3b4a20016.tar.gz |
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]
(From OE-Core rev: 5933fbef26ffbc8140248ffb28957f36a813054b)
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/run-postinsts/run-postinsts')
-rw-r--r-- | meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.init | 3 | ||||
-rw-r--r-- | meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service | 17 |
2 files changed, 20 insertions, 0 deletions
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 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | 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 @@ | |||
1 | [Unit] | ||
2 | Description=Run pending postinsts | ||
3 | DefaultDependencies=no | ||
4 | After=systemd-remount-fs.service systemd-tmpfiles-setup.service tmp.mount | ||
5 | Before=sysinit.target | ||
6 | ConditionPathExistsGlob=#SYSCONFDIR#/*-postinsts | ||
7 | |||
8 | [Service] | ||
9 | Type=oneshot | ||
10 | ExecStart=#SBINDIR#/run-postinsts | ||
11 | ExecStartPost=#BASE_BINDIR#/systemctl disable run-postinsts.service | ||
12 | RemainAfterExit=No | ||
13 | TimeoutSec=0 | ||
14 | |||
15 | [Install] | ||
16 | WantedBy=basic.target | ||
17 | WantedBy=sysinit.target | ||