Re: Running a non-idempotent command from udev

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <demi@xxxxxxxxxxxxxxxxxxxxxx> 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

[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux