Allow elogind to exit when dbus is closed

As reported in ticket #16177 by Joe Locash, switching from runlevel
3 to 1 and back would render elogind useless: it is still running
but not connected to the bus, because dbus is killed in runlevel 1
and then restarted in runlevel 3. The added "sed" allows elogind to
exit when dbus is killed. This is the normal behavior of daemons
using dbus.
This commit is contained in:
Pierre Labastie 2022-03-12 11:04:07 +01:00
parent 76370138fe
commit 27e5cd4c32
2 changed files with 22 additions and 0 deletions

View File

@ -154,6 +154,12 @@ File systems --->
<screen><userinput>sed -i '/Disable polkit/,+8 d' meson.build &amp;&amp;
sed '/request_name/i\
r = sd_bus_set_exit_on_disconnect(m->bus, true);\
if (r &lt; 0)\
return log_error_errno(r, "Failed to set exit on disconnect: %m");' \
-i src/login/logind.c &amp;&amp;
mkdir build &amp;&amp;
cd build &amp;&amp;
@ -191,6 +197,12 @@ ln -sfvn elogind /usr/include/systemd</userinput></screen>
installed.
</para>
<para>
<command>sed ... src/login/logind.c</command>: This change allows the
elogind daemon to exit when it is disconnected from dbus (for example
when dbus is killed).
</para>
<para>
<parameter>-Dcgroup-controller=elogind</parameter>: This switch ensures
that <application>elogind</application> is selected as the cgroup

View File

@ -41,6 +41,16 @@
</itemizedlist>
</listitem>
-->
<listitem revision="sysv">
<para>March 12th, 2022</para>
<itemizedlist>
<listitem>
<para>[pierre] - Allow elogind to exit when dbus is closed. Fixes
<ulink url="&blfs-ticket-root;16177">#16177</ulink>.</para>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<para>March 11th, 2022</para>
<itemizedlist>