[systemd-devel] Starting a service before any networking

2023-09-26 Thread Mark Rogers
I'm sure this is trivial but I've gone round in circles without success. I have a script which reads from an SQLite database and generates various system configuration files - at the moment these are dhcpcd.conf and wpa_supplicant.conf but this might grow in future. As such the only dependency th

[systemd-devel] How to get Credential into Environment variable?

2023-09-26 Thread chandler
Hi all,     I'm not quite grasping something here... I've just learned about `systemd-creds` and now trying to utilize it with a service which depends on a secret stored in an environment variable (or passed as a CLI option). Normally I could use a line like: `Environment=SEC=1234` Now I've: 1

Re: [systemd-devel] Starting a service before any networking

2023-09-26 Thread Mantas Mikulėnas
Depends on what exactly runs dhcpcd and wpa_supplicant. Is that done by networking.service (ifupdown)? NetworkManager? Are they standalone services? I would generally expect Before/Wants=network-pre.target to work, but that relies on your network services themselves being set up correctly – they t

Re: [systemd-devel] Starting a service before any networking

2023-09-26 Thread Mark Rogers
On Tue, 26 Sept 2023 at 13:08, Mantas Mikulėnas wrote: > Depends on what exactly runs dhcpcd and wpa_supplicant. Is that done by > networking.service (ifupdown)? NetworkManager? Are they standalone services? > How do I tell? (System is a Pi running an elderly Raspbian. The issue I am having is

Re: [systemd-devel] Starting a service before any networking

2023-09-26 Thread Mantas Mikulėnas
On Tue, Sep 26, 2023, 15:32 Mark Rogers wrote: > On Tue, 26 Sept 2023 at 13:08, Mantas Mikulėnas wrote: > >> Depends on what exactly runs dhcpcd and wpa_supplicant. Is that done by >> networking.service (ifupdown)? NetworkManager? Are they standalone services? >> > > How do I tell? > Run `syste

[systemd-devel] udev database cross-version compatibility

2023-09-26 Thread Valentin David
Hello, Back in 2014 and again in 2020, there were discussions on the mailing-list related to udev database version safety. This was important to know if libudev from a container could access to /run/udev/data files safely. Given then libudev and systemd-udevd would be potentially different vers

Re: [systemd-devel] Starting a service before any networking

2023-09-26 Thread Mark Rogers
On Tue, 26 Sept 2023 at 13:44, Mantas Mikulėnas wrote: > I think you're confusing two different states, which have similar > indications – "administrative" up/down that you control (the "" flag, > with nothing shown when down) and "operational" up/down that represents the > actual interface statu

Re: [systemd-devel] Starting a service before any networking

2023-09-26 Thread Mantas Mikulėnas
On 2023-09-26 21:31, Mark Rogers wrote: On Tue, 26 Sept 2023 at 13:44, Mantas Mikulėnas > wrote: I'm still not entirely sure of the situation but right now it sounds like the configuration is okay but the Ethernet interface is failing to establish a physica

Re: [systemd-devel] Starting a service before any networking

2023-09-26 Thread Mark Rogers
On Tue, 26 Sept 2023 at 19:38, Mantas Mikulėnas wrote: > That's not a race condition; it's a fault in the network interface > itself. "NO-CARRIER" means it's physically unable to establish the > Ethernet link – an external condition that the service ordering has no > effect on. > That's interest

Re: [systemd-devel] Starting a service before any networking

2023-09-26 Thread Demi Marie Obenour
On Tue, Sep 26, 2023 at 11:50:55AM +0100, Mark Rogers wrote: > I'm sure this is trivial but I've gone round in circles without success. > > I have a script which reads from an SQLite database and generates various > system configuration files - at the moment these are dhcpcd.conf and > wpa_supplic