tipcutils: add systemd service file
PATCH 1/1 tipcutils: add systemd service file
From: Vijay Anusuri <[email protected]>
Add systemd service file for tipcutils
--- .../tipcutils/tipcutils/tipcutils.service | 12 ++++++++++++ meta-oe/recipes-extended/tipcutils/tipcutils_git.bb | 9 ++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-extended/tipcutils/tipcutils/tipcutils.service
meta-oe/recipes-extended/tipcutils/tipcutils/tipcutils.service new file +12 -0
@@ -0,0 +1,12 @@ +[Unit] +Description=Transparent Inter-Process Communication protocol +After=syslog.target remote-fs.target + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=modprobe tipc +ExecStop=rmmod tipc + +[Install] +WantedBy=multi-user.target
meta-oe/recipes-extended/tipcutils/tipcutils_git.bb +8 -1
@@ -3,6 +3,7 @@ LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://tipclog/tipc.h;endline=35;md5=985b6ea8735818511d276c1b466cce98" SRC_URI = "git://git.code.sf.net/p/tipc/tipcutils;branch=master \ + file://tipcutils.service \ file://0001-include-sys-select.h-for-FD_-definitions.patch \ file://0002-replace-non-standard-uint-with-unsigned-int.patch \ file://0001-multicast_blast-tipcc-Fix-struct-type-for-TIPC_GROUP.patch \
@@ -11,7 +12,7 @@ SRC_URI = "git://git.code.sf.net/p/tipc/tipcutils;branch=master \ SRCREV = "7ab2211b87414ba240b0b2e4af219c1057c9cf9a" PV = "2.2.0+git" -inherit autotools pkgconfig +inherit autotools pkgconfig systemd DEPENDS += "libdaemon"
@@ -41,8 +42,14 @@ do_install:append() { install -d ${D}${sysconfdir} cp -R --no-dereference --preserve=mode,links -v ${S}/scripts/etc/* ${D}${sysconfdir}/ chown -R root:root ${D}${sysconfdir} + if [ "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" ]; then + install -d ${D}${systemd_unitdir}/system + install -m 0755 ${WORKDIR}/tipcutils.service ${D}/${systemd_unitdir}/system + fi } +SYSTEMD_SERVICE:${PN} = "tipcutils.service" + PACKAGES += "${PN}-demos" FILES:${PN}-dbg += "/opt/tipcutils/demos/*/.debug /opt/tipcutils/ptts/.debug" FILES:${PN}-demos = "/opt/tipcutils/*"
Signature · 1 line
2.25.1
Hi,
Quoted 21 lines · Vijay Anusuri via lists.openembedded.org
From: Vijay Anusuri <[email protected]>
Add systemd service file for tipcutils
Signed-off-by Vijay Anusuri <[email protected]>---
.../tipcutils/tipcutils/tipcutils.service | 12
++++++++++++
meta-oe/recipes-extended/tipcutils/tipcutils_git.bb | 9 ++++++++-2 files changed, 20 insertions(+), 1 deletion(-)create mode 100644 meta-oe/recipes-
extended/tipcutils/tipcutils/tipcutils.service(quoted diff) +0
-0extended/tipcutils/tipcutils/tipcutils.service b/meta-oe/recipes- extended/tipcutils/tipcutils/tipcutils.service
new file mode 100644
index 000000000..42bf6517e
meta-oe/recipes-extended/tipcutils/tipcutils/tipcutils.service line 9
Quoted 9 lines
meta-oe/recipes-extended/tipcutils/tipcutils/tipcutils.service new file +9
-0@@ -0,0 +1,12 @@ +[Unit] +Description=Transparent Inter-Process Communication protocol +After=syslog.target remote-fs.target + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=modprobe tipc +ExecStop=rmmod tipc
Wouldn't it be better to use modules-load.d instead:
https://www.man7.org/linux/man-pages/man5/modules-load.d.5.html
?
// Martin
Quoted 63 lines
meta-oe/recipes-extended/tipcutils/tipcutils/tipcutils.service new file +3
-0+ +[Install] +WantedBy=multi-user.targetmeta-oe/recipes-extended/tipcutils/tipcutils_git.bb +0
-0@@ -3,6 +3,7 @@ LICENSE = "GPL-2.0-only"LIC_FILES_CHKSUM = "file://tipclog/tipc.h;endline=35;md5=985b6ea8735818511d276c1b466cce9 8"
SRC_URI = "git://git.code.sf.net/p/tipc/tipcutils;branch=master\
+ file://tipcutils.service \
file://0001-include-sys-select.h-for-FD_-definitions.patch \
file://0002-replace-non-standard-uint-with-unsigned-int.patch \
file://0001-multicast_blast-tipcc-Fix-struct-type-for-TIPC_GROUP.patch \meta-oe/recipes-extended/tipcutils/tipcutils_git.bb +0
-0@@ -11,7 +12,7 @@ SRC_URI = "git://git.code.sf.net/p/tipc/tipcutils;branch=master \SRCREV = "
7ab2211b87414ba240b0b2e4af219c1057c9cf9a" PV = "2.2.0+git"meta-oe/recipes-extended/tipcutils/tipcutils_git.bb +1
-1-inherit autotools pkgconfig +inherit autotools pkgconfig systemd
DEPENDS += "libdaemon"meta-oe/recipes-extended/tipcutils/tipcutils_git.bb +0
-0@@ -41,8 +42,14 @@ do_install:append() { install -d ${D}${sysconfdir}cp -R --no-dereference --preserve=mode,links -v ${S}/scripts/etc/* ${D}${sysconfdir}/
chown -R root:root ${D}${sysconfdir}
+ if [ "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" ]; then
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0755 ${WORKDIR}/tipcutils.service ${D}/${systemd_unitdir}/system
+ fi
}meta-oe/recipes-extended/tipcutils/tipcutils_git.bb +2
-0+SYSTEMD_SERVICE:${PN} = "tipcutils.service" +PACKAGES += "${PN}-demos"
FILES:${PN}-dbg += "/opt/tipcutils/demos/*/.debug/opt/tipcutils/ptts/.debug" FILES:${PN}-demos = "/opt/tipcutils/*"-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#110818):
https://lists.openembedded.org/g/openembedded-devel/message/110818
Mute This Topic: https://lists.openembedded.org/mt/106609163/3618414
Group Owner: [email protected] Unsubscribe:
https://lists.openembedded.org/g/openembedded-devel/unsub [
[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Thanks Martin.
As we explicitly loading tipc kernel module, it's better to use modules-load.d .
I will send the v2 patch.
Thanks & Regards,
Vijay
Quoted 107 lines · Martin Hundebøll
Hi,
Quoted 21 lines · Vijay Anusuri via lists.openembedded.org
From: Vijay Anusuri <[email protected]>
Add systemd service file for tipcutils
Signed-off-by Vijay Anusuri <[email protected]>--- .../tipcutils/tipcutils/tipcutils.service | 12 ++++++++++++ meta-oe/recipes-extended/tipcutils/tipcutils_git.bb | 9 ++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-extended/tipcutils/tipcutils/tipcutils.service
(quoted diff) +0
-0extended/tipcutils/tipcutils/tipcutils.service b/meta-oe/recipes- extended/tipcutils/tipcutils/tipcutils.service
new file mode 100644
index 000000000..42bf6517emeta-oe/recipes-extended/tipcutils/tipcutils/tipcutils.service line 9
Quoted 9 lines
meta-oe/recipes-extended/tipcutils/tipcutils/tipcutils.service new file +9
-0@@ -0,0 +1,12 @@ +[Unit] +Description=Transparent Inter-Process Communication protocol +After=syslog.target remote-fs.target + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=modprobe tipc +ExecStop=rmmod tipcWouldn't it be better to use modules-load.d instead:
https://www.man7.org/linux/man-pages/man5/modules-load.d.5.html?
// Martin
Quoted 63 lines
meta-oe/recipes-extended/tipcutils/tipcutils/tipcutils.service new file +3
-0+ +[Install] +WantedBy=multi-user.targetmeta-oe/recipes-extended/tipcutils/tipcutils_git.bb +0
-0@@ -3,6 +3,7 @@ LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM ="file://tipclog/tipc.h;endline=35;md5=985b6ea8735818511d276c1b466cce9 8"
SRC_URI= "git://git.code.sf.net/p/tipc/tipcutils;branch=master\
+ file://tipcutils.service \file://0001-include-sys-select.h-for-FD_-definitions.patch \
file://0002-replace-non-standard-uint-with-unsigned-int.patch \
file://0001-multicast_blast-tipcc-Fix-struct-type-for-TIPC_GROUP.patch
\meta-oe/recipes-extended/tipcutils/tipcutils_git.bb +1
-1@@ -11,7 +12,7 @@ SRC_URI = "git://git.code.sf.net/p/tipc/tipcutils;branch=master \ SRCREV = "7ab2211b87414ba240b0b2e4af219c1057c9cf9a" PV = "2.2.0+git" -inherit autotools pkgconfig +inherit autotools pkgconfig systemd DEPENDS += "libdaemon"@@ -41,8 +42,14 @@ do_install:append() { install -d ${D}${sysconfdir} cp -R --no-dereference --preserve=mode,links -v${S}/scripts/etc/* ${D}${sysconfdir}/
chown -R root:root ${D}${sysconfdir}+ if [ "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" ];
thenmeta-oe/recipes-extended/tipcutils/tipcutils_git.bb +2
-0+ install -d ${D}${systemd_unitdir}/system + install -m 0755 ${WORKDIR}/tipcutils.service${D}/${systemd_unitdir}/system
meta-oe/recipes-extended/tipcutils/tipcutils_git.bb +3
-0+ fi } +SYSTEMD_SERVICE:${PN} = "tipcutils.service" + PACKAGES += "${PN}-demos" FILES:${PN}-dbg += "/opt/tipcutils/demos/*/.debug
/opt/tipcutils/ptts/.debug"
FILES:${PN}-demos = "/opt/tipcutils/*"-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#110818):
https://lists.openembedded.org/g/openembedded-devel/message/110818
Mute This Topic: https://lists.openembedded.org/mt/106609163/3618414
Group Owner: [email protected] Unsubscribe:
https://lists.openembedded.org/g/openembedded-devel/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-