Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 4/6] package/seatd: install init scripts
Date: Sun, 16 May 2021 16:00:36 +0200	[thread overview]
Message-ID: <20210516140036.GG2506@scaer> (raw)
In-Reply-To: <20210513163325.1775639-5-aperez@igalia.com>

Adrian, All,

On 2021-05-13 19:33 +0300, Adrian Perez de Castro spake thusly:
> Add commands to the seatd package to install the systemd unit included
> in the source tarball and a SysV init script.
> 
> Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
> ---
>  package/seatd/S70seatd | 38 ++++++++++++++++++++++++++++++++++++++
>  package/seatd/seatd.mk | 10 ++++++++++
>  2 files changed, 48 insertions(+)
>  create mode 100755 package/seatd/S70seatd
> 
> diff --git a/package/seatd/S70seatd b/package/seatd/S70seatd
> new file mode 100755
> index 0000000000..a91302c6c1
> --- /dev/null
> +++ b/package/seatd/S70seatd
> @@ -0,0 +1,38 @@
> +#! /bin/sh
> +#
> +# Starts seatd
> +#
> +
> +DAEMON=/usr/bin/seatd
> +PIDFILE=/run/seatd.pid
> +
> +case "$1" in
> +	start)
> +		printf 'Starting seatd: '
> +		if start-stop-daemon -S -x "$DAEMON" -p "$PIDFILE" -m -b -- -g video

I guess this means using the 'video' group, right?

Currently, we do define the video group in the default skeleton, but I
wonder if we should not ensure the group does exist:

    define SEATD_USERS
        - - video -1 - - - - -
    endef

I have no strong feeling about it, though..

Regards,
Yann E. MORIN.

> +		then
> +			echo OK
> +		else
> +			echo FAIL
> +		fi
> +		;;
> +	stop)
> +		if start-stop-daemon -K -x "$DAEMON" -p "$PIDFILE"
> +		then
> +			echo OK
> +		else
> +			echo FAIL
> +		fi
> +		;;
> +	restart)
> +		"$0" stop || true
> +		sleep 1
> +		"$0" start
> +		;;
> +	*)
> +		echo "Usage: $0 {start|stop|restart}"
> +		exit 1
> +		;;
> +esac
> +
> +exit 0
> diff --git a/package/seatd/seatd.mk b/package/seatd/seatd.mk
> index 45da53904f..abb7cb888f 100644
> --- a/package/seatd/seatd.mk
> +++ b/package/seatd/seatd.mk
> @@ -39,4 +39,14 @@ else
>  SEATD_CONF_OPTS += -Dserver=disabled
>  endif
>  
> +define SEATD_INSTALL_INIT_SYSV
> +	$(INSTALL) -m 0755 -D $(SEATD_PKGDIR)/S70seatd \
> +		$(TARGET_DIR)/etc/init.d/S70seatd
> +endef
> +
> +define SEATD_INSTALL_INIT_SYSTEMD
> +	$(INSTALL) -m 0644 -D $(@D)/contrib/systemd/seatd.service \
> +		$(TARGET_DIR)/usr/lib/systemd/system/seatd.service
> +endef
> +
>  $(eval $(meson-package))
> -- 
> 2.31.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

  reply	other threads:[~2021-05-16 14:00 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-13 16:33 [Buildroot] [PATCH 0/6] Update Cage, wlroots, and wayland Adrian Perez de Castro
2021-05-13 16:33 ` [Buildroot] [PATCH 1/6] package/wayland: bump to version 1.19.0 Adrian Perez de Castro
2021-05-16 14:04   ` Yann E. MORIN
2021-05-18 12:13     ` Adrian Perez de Castro
2021-05-13 16:33 ` [Buildroot] [PATCH 2/6] package/wlroots: bump to version 0.13.0 Adrian Perez de Castro
2021-05-16 13:41   ` Yann E. MORIN
2021-05-18 12:22     ` Adrian Perez de Castro
2021-05-13 16:33 ` [Buildroot] [PATCH 3/6] package/seatd: new package Adrian Perez de Castro
2021-05-16 13:54   ` Yann E. MORIN
2021-05-18 13:17     ` Adrian Perez de Castro
2021-05-13 16:33 ` [Buildroot] [PATCH 4/6] package/seatd: install init scripts Adrian Perez de Castro
2021-05-16 14:00   ` Yann E. MORIN [this message]
2021-05-18 13:33     ` Adrian Perez de Castro
2021-05-13 16:33 ` [Buildroot] [PATCH 5/6] package/wlroots: use libseat when available Adrian Perez de Castro
2021-05-13 16:33 ` [Buildroot] [PATCH 6/6] package/cage: bump to version 0.1.3 Adrian Perez de Castro
2021-05-16 14:07 ` [Buildroot] [PATCH 0/6] Update Cage, wlroots, and wayland Yann E. MORIN
2021-05-18 13:54 ` [Buildroot] [PATCH v2 0/5] " Adrian Perez de Castro
2021-05-18 13:54   ` [Buildroot] [PATCH v2 1/5] package/wlroots: bump to version 0.13.0 Adrian Perez de Castro
2021-05-18 13:54   ` [Buildroot] [PATCH v2 2/5] package/seatd: new package Adrian Perez de Castro
2021-05-18 13:54   ` [Buildroot] [PATCH v2 3/5] package/seatd: install init scripts Adrian Perez de Castro
2021-05-18 13:54   ` [Buildroot] [PATCH v2 4/5] package/wlroots: use libseat when available Adrian Perez de Castro
2021-05-18 13:54   ` [Buildroot] [PATCH v2 5/5] package/cage: bump to version 0.1.3 Adrian Perez de Castro
2021-05-18 14:00   ` [Buildroot] [PATCH v2 0/5] Update Cage, wlroots, and wayland Adrian Perez de Castro
2021-05-18 17:11   ` Yann E. MORIN
2021-05-27 13:41     ` Adrian Perez de Castro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210516140036.GG2506@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox