diff options
author | Igor Opaniuk <igor.opaniuk@toradex.com> | 2020-11-25 19:29:43 +0200 |
---|---|---|
committer | Igor Opaniuk <igor.opaniuk@gmail.com> | 2020-11-25 19:29:43 +0200 |
commit | b1d95a6bb125e5a84f8e02adf6f1df0552317c8b (patch) | |
tree | 30a3fb31d3d994a6660f9622209c5fc93982961e /recipes-devtools/mtd | |
parent | 96b139542f3c1e3cf7f12a9f2f8106571813c103 (diff) |
mtd-utils: add initial systemd service description
Add initial ubihealthd.service for systemd. It can be enabled to
start automatically.
Testing:
[ OK ] Reached target Graphical Interface.
Starting Update UTMP about System Runlevel Changes...
Starting UBI health daemon...
[ OK ] Started UBI health daemon.
....
root@colibri-imx6ull:~# systemctl status ubihealthd.service
* ubihealthd.service - UBI health daemon
Loaded: loaded (/lib/systemd/system/ubihealthd.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2020-11-25 16:09:03 UTC; 41s ago
Process: 498 ExecStart=/usr/sbin/ubihealthd (code=exited, status=0/SUCCESS)
Main PID: 499 (ubihealthd)
CGroup: /system.slice/ubihealthd.service
`-499 /usr/sbin/ubihealthd
Nov 25 16:09:03 colibri-imx6ull systemd[1]: Starting UBI health daemon...
Nov 25 16:09:03 colibri-imx6ull systemd[1]: Started UBI health daemon.
Related-to: ELB-3249
Signed-off-by: default avatarIgor Opaniuk <igor.opaniuk@toradex.com>
Diffstat (limited to 'recipes-devtools/mtd')
-rw-r--r-- | recipes-devtools/mtd/mtd-utils/ubihealthd.service | 10 | ||||
-rw-r--r-- | recipes-devtools/mtd/mtd-utils_%.bbappend | 16 |
2 files changed, 26 insertions, 0 deletions
diff --git a/recipes-devtools/mtd/mtd-utils/ubihealthd.service b/recipes-devtools/mtd/mtd-utils/ubihealthd.service new file mode 100644 index 0000000..74b8df6 --- /dev/null +++ b/recipes-devtools/mtd/mtd-utils/ubihealthd.service @@ -0,0 +1,10 @@ +[Unit] +Description=UBI health daemon +After=multi-user.target + +[Service] +Type=forking +ExecStart=@SBINDIR@/ubihealthd + +[Install] +WantedBy=multi-user.target diff --git a/recipes-devtools/mtd/mtd-utils_%.bbappend b/recipes-devtools/mtd/mtd-utils_%.bbappend new file mode 100644 index 0000000..054c939 --- /dev/null +++ b/recipes-devtools/mtd/mtd-utils_%.bbappend @@ -0,0 +1,16 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +SRC_URI_append_ = " file://ubihealthd.service" + +inherit systemd + +SYSTEMD_PACKAGES = "${PN}" +SYSTEMD_SERVICE_${PN} = "ubihealthd.service" +SYSTEMD_AUTO_ENABLE = "disable" + +do_install_append() { + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/ubihealthd.service ${D}${systemd_unitdir}/system/ + sed -i -e 's,@SBINDIR@,${sbindir},g' \ + -e 's,@SYSCONFDIR@,${sysconfdir},g' \ + ${D}${systemd_unitdir}/system/*.service +} |