Hi,

On Tue, 2024-06-11 at 12:38 +0530, Vijay Anusuri via
lists.openembedded.org wrote:
> 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
> 
> diff --git a/meta-oe/recipes-
> extended/tipcutils/tipcutils/tipcutils.service b/meta-oe/recipes-
> extended/tipcutils/tipcutils/tipcutils.service
> new file mode 100644
> index 000000000..42bf6517e
> --- /dev/null
> +++ b/meta-oe/recipes-extended/tipcutils/tipcutils/tipcutils.service
> @@ -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

> +
> +[Install]
> +WantedBy=multi-user.target
> diff --git a/meta-oe/recipes-extended/tipcutils/tipcutils_git.bb
> b/meta-oe/recipes-extended/tipcutils/tipcutils_git.bb
> index 596aa260e..335263009 100644
> --- a/meta-oe/recipes-extended/tipcutils/tipcutils_git.bb
> +++ b/meta-oe/recipes-extended/tipcutils/tipcutils_git.bb
> @@ -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
>  \
> @@ -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/*"
> 
> 
> 

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#110825): 
https://lists.openembedded.org/g/openembedded-devel/message/110825
Mute This Topic: https://lists.openembedded.org/mt/106609163/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to