[systemd-devel] lirc package
Zbigniew Jędrzejewski-Szmek
zbyszek at in.waw.pl
Mon Oct 14 06:57:48 PDT 2013
On Sat, Oct 12, 2013 at 11:39:08AM +0200, Alec Leamas wrote:
> Some day David Strauss wrote:
> >On Sun, Oct 6, 2013 at 6:13 AM, Rave it<chat-to-me at raveit.de> wrote:
> >>A view in the spec file shows me that there is a lot of new things for me, ie. systemd.
> >>So i may need some assistents.
> >Please feel free to email the systemd mailing list [1] or ask for help
> >in our IRC channel, which is #systemd on Freenode. We're always happy
> >to help packagers and upstream projects achieve good integration.
> >
> >[1]http://lists.freedesktop.org/mailman/listinfo/systemd-devel
> I have now taken ownership of lirc. Also, I have tried to fix some
> open systemd issues by adding socket activation support. The patch
> is available [1], look for systemd activation in the commits.
>
> If someone on this list could review this it would be really nice,
> it's the first time I do anything like it. Feedback on this list or
> directly on [1], whatever is convenient
Add 'Also=lircd.service' to [Install] in socket file, so that
'systemctl enable lircd' will enable the socket too.
/etc/sysconfig is considered deprecated. You use LIRCMD_OPTIONS
as an additional switch to enable/disable lircmd, which duplicates
systemctl enable/disable...
Colin's idea to use templates would be really nice. But it's probably
more complicated, since /run/lirc/lircd seems to be a singleton,
so multiple lircds would require some modification to the users
of that socket.
> /* create socket */
> - sockfd = socket(AF_UNIX, SOCK_STREAM, 0);
> - if (sockfd == -1) {
> - fprintf(stderr, "%s: could not create socket\n", progname);
> - perror(progname);
> + sockfd = -1;
> +#ifdef HAVE_SYSTEMD
> + n = sd_listen_fds(0);
> + if (n > 1) {
> + fprintf(stderr, "Too many file descriptors received.\n");
> goto start_server_failed0;
> - }
> + exit(1);
Isn't this exit(1) dead code?
Looks OK otherwise.
Zbyszek
More information about the systemd-devel
mailing list