Re: [systemd-devel] Running a non-idempotent command from udev
On Sat, Jul 15, 2023 at 09:00:03PM +0300, Mantas Mikulėnas wrote: > Is that "once per boot", "once per interface appearance", or "once per > physical NIC lifetime"? Can the command check its effects directly (i.e. > check whether a setting has been set, or whatever the task is)? Once per virtual NIC appearance. The catch is that the NIC can disappear and reappear very quickly, and the script must be run every time this happens. Furthermore, the script must wait for network-pre.target. -- Sincerely, Demi Marie Obenour (she/her/hers) Invisible Things Lab signature.asc Description: PGP signature
Re: [systemd-devel] Running a non-idempotent command from udev
Is that "once per boot", "once per interface appearance", or "once per physical NIC lifetime"? Can the command check its effects directly (i.e. check whether a setting has been set, or whatever the task is)? If it's once per boot, a flag file in /run/thing_done.$ifname would be a common solution... If it needs to be done again if the interface disappears and reappears – udev ENV{thing_done}="1". On Sat, Jul 15, 2023, 19:20 Demi Marie Obenour wrote: > What is the appropriate solution for running a non-idempotent command > from udev? One command needs to be run exactly once when a network > interface appears, and another command needs to be run exactly once when > a network interface disappears. Both commands need to run after > network-pre.target, but that can be handled in the script themselves. > -- > Sincerely, > Demi Marie Obenour (she/her/hers) > Invisible Things Lab >
[systemd-devel] Running a non-idempotent command from udev
What is the appropriate solution for running a non-idempotent command from udev? One command needs to be run exactly once when a network interface appears, and another command needs to be run exactly once when a network interface disappears. Both commands need to run after network-pre.target, but that can be handled in the script themselves. -- Sincerely, Demi Marie Obenour (she/her/hers) Invisible Things Lab signature.asc Description: PGP signature