Message ID | 20231023022529.15081-1-felix.moessbauer@siemens.com |
---|---|
Headers | show |
Series | Rework socket creation to better integrate with systemd | expand |
Hi Felix, On 23.10.23 04:25, 'Felix Moessbauer' via swupdate wrote: > This series is a follow up of "core: fail if running under systemd but not sockets". > As discussed on the ML, the implemented approach of failing in case no sockets are > are provided was not sufficient and by that cannot be integrated. > > The new series solves all issues which were brought up in the discussion by > following a different strategy. Instead of trying to guess if we are running as > systemd service, we simply track which sockets we manually create and register > cleanup handlers for them. This also includes some cleanup of the existing socket > creation infrastructure (p1-p3). Thanks for the series, this makes absolutely sense and implements what we discussed before. > > The patches p4,p5 take care of creating the sockets at the correct path when running > on a systemd bootet system (no matter if as service or via the shell). First 3 patches are a nice cleanup and I plan to apply soon. Patch 4 requires some discussion. Best regards, Stefano > > Best regards, > Felix Moessbauer > Siemens AG > > Felix Moessbauer (5): > fix: properly cleanup sockets on SIGTERM > move listener_create to network_utils.c > remove irrelevant sd_booted values > create ipc sockets below /run on systemd > docs: improve swupdate.socket systemd example > > core/Makefile | 1 + > core/network_thread.c | 78 +---------------------- > core/network_utils.c | 124 ++++++++++++++++++++++++++++++++++++ > core/progress_thread.c | 21 +----- > core/swupdate.c | 8 ++- > doc/source/swupdate.rst | 13 ++-- > include/network_interface.h | 1 - > include/network_utils.h | 32 ++++++++++ > ipc/network_ipc.c | 10 ++- > ipc/progress_ipc.c | 10 ++- > 10 files changed, 188 insertions(+), 110 deletions(-) > create mode 100644 core/network_utils.c > create mode 100644 include/network_utils.h >