starting a service from within a oneshot using s6-rc
Benjamin Isbarn <[email protected]> Mon, 27 Oct 2025 16:27:49 +0000
| Newsgroups | gmane.comp.sysutils.supervision.general |
|---|---|
| Message-ID | <CAGzzmDDFvB9YX-jFs9rBbM_wzQTJQ2WESV_5J1xY7MsC6Q_DTA@mail.gmail.com> |
--0000000000000975d90642266205 Content-Type: text/plain; charset="UTF-8" Hi, I've stumbled upon a problem when trying to start a service from within a oneshot service. The oneshot in question is basically a small binary that tries to apply a network configuration given a configuration file. Basically there are the tow cases DHCP and static. For DHCP I want to use busybox's udhcpc which I wrapped into a long run service. So wenn the oneshot tool tries to apply the network config and DHCP is set it then tries to launch `s6-rc start udhcpc`. However, this doesn't work since the oneshot itself is part of the initial `s6-rc change ok-all` which blocks the service database at least until the oneshot itself has finished. Do you have some suggestion for workarounds around this problem? I guess touching a file like /run/udhcpc.wanted, adding the oneshot to the dependencies of udhcpc and start udhcpc conditionally based on the existence of that file could work, but I don't really like that approach. Any suggestions are welcome :) Best regards, Benny --0000000000000975d90642266205--