Re: systemd startup

Ognyan Manchev <[email protected]> Wed, 7 Jul 2021 10:20:28 +0300
Newsgroups gmane.comp.hardware.lirc
Message-ID <CAOx-N7p9_0Hc1N2GkLFJG=U0xH0zQZSZd59QROBkMPtEKtV9LQ@mail.gmail.com>
--===============1198075082314623504==
Content-Type: multipart/alternative; boundary="0000000000001e476f05c683605c"

--0000000000001e476f05c683605c
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hi Mary,

If you add RuntimeDirectory=3Dlirc in the lirc unit file systemd will creat=
e
a proper /var/run/lirc directory at boot. Check man systemd.exec(5)  for
details and possibly SELinux implications.

Cheers,
Oggy

=D0=9D=D0=B0 =D0=B2=D1=82, 6.07.2021 =D0=B3. =D0=B2 20:29 =D1=87. Mary Stri=
mel <[email protected]> =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0:

> Hello,
> I now have my USB-UIRT configured so that it transmits IR pulses. Yay!!!
> Very exciting.
>
> The remaining glitch is that I have to start lircd manually to get it to
> work. If I run "sudo lircd" it works fine, but if I do "systemctl start
> lircd" then it does not work and I see the following error in the log:
>
> "can't open or create /var/run/lirc/lircd.pid: Permission denied"
> and lircd fails to start
>
> The systemd service file for lircd shows the user as lirc and the group a=
s
> lirc.  I tried changing the user in that file to "root" [I don't really
> know what I'm doing] but it didn't help. In fact, that caused SELinux to
> throw an error so it seemed to make things worse. I ran the commands
> suggested by the SELinux troubleshooter, several times, but the error
> persists.
>
> How can i give lirc the appropriate access to /var/run/lirc/lircd.pid on =
a
> persistent basis (assuming that is the issue here)?
> Thanks in advance,
> Mary
>

--0000000000001e476f05c683605c
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Hi Mary,</div><div><br></div><div>If you=20
add RuntimeDirectory=3Dlirc in the lirc unit file systemd will create a pro=
per /var/run/lirc directory at boot. Check man systemd.exec(5)=C2=A0 for de=
tails and possibly SELinux implications.</div><div><br></div><div>Cheers,</=
div><div>Oggy<br></div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr=
" class=3D"gmail_attr">=D0=9D=D0=B0 =D0=B2=D1=82, 6.07.2021 =D0=B3. =D0=B2 =
20:29 =D1=87. Mary Strimel &lt;<a href=3D"mailto:[email protected]">ma=
[email protected]</a>&gt; =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0:<br></div=
><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border=
-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr">Hello,<=
div>I now have my USB-UIRT configured so that it transmits IR pulses. Yay!!=
!=C2=A0 Very exciting.</div><div><br></div><div>The remaining glitch is tha=
t I have to start lircd=C2=A0manually to get it to work. If I run &quot;sud=
o lircd&quot; it works fine, but if I do &quot;systemctl start lircd&quot; =
then it does not work and I see the following error in the log:</div><div><=
br></div><div>&quot;can&#39;t open or create /var/run/lirc/lircd.pid: Permi=
ssion denied&quot;</div><div>and lircd fails to start</div><div><br></div><=
div>The systemd service file for lircd shows the user as lirc and the group=
 as lirc.=C2=A0 I tried changing the user in that file to &quot;root&quot; =
[I don&#39;t really know what I&#39;m doing] but it didn&#39;t help. In fac=
t, that caused SELinux to throw an error so it seemed to make things worse.=
 I ran the commands suggested by the SELinux troubleshooter, several times,=
 but the error persists.</div><div><br></div><div>How can i give lirc the a=
ppropriate access to /var/run/lirc/lircd.pid on a persistent basis (assumin=
g that is the issue here)?</div><div>Thanks in advance,</div><div>Mary=C2=
=A0</div></div>
</blockquote></div>

--0000000000001e476f05c683605c--


--===============1198075082314623504==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============1198075082314623504==--