> The requirement here is, I need to know when ens1 goes up or down, so > that I can make changes to the bridge interface. The `ifmonitor` script > will monitor the link status of ens1, and then take appropriate actions, > such as restarting a DHCP client, adding or removing routes that have > been programmed via the lan0 bridge to egress on ens1, adding or > removing IP addresses from the configuration, etc.
Knowing the status of the physical link so that you can take appropriate action on the bridge/bond makes sense. But it seems to me that should be handled intrinsically by networkd, not something you could or should configure with scripts. Opening a task on systemd for us to verify the behavior here. When all the physical links in a bridge/bond drop, does networkd treat that as a down / subsequent up event? When you say "egress on ens1", what do you mean? Your network config doesn't show any such routes. Why would these routes be managed externally to networkd? > In the ifupdown world, the other horrible hack I've sometimes found > necessary (although the reason why is eluding me at the moment) is when > I want an interface to be 'manual', yet behave like a 'static' > definition, in that it should configure itself automatically when it > comes online. So I might have something like: In ifupdown, I would expect to handle this as a static network without 'auto'. For netplan / networkd, this looks like it needs some further work to support, already captured in bug #1664844. ** Also affects: systemd (Ubuntu) Importance: Undecided Status: New ** Changed in: systemd (Ubuntu) Importance: Undecided => High ** Changed in: systemd (Ubuntu) Status: New => Triaged ** Changed in: systemd (Ubuntu) Milestone: None => ubuntu-17.05 ** Changed in: systemd (Ubuntu) Assignee: (unassigned) => Mathieu Trudel-Lapierre (cyphermox) -- You received this bug notification because you are a member of Ubuntu Desktop Bugs, which is subscribed to systemd in Ubuntu. https://bugs.launchpad.net/bugs/1664818 Title: Not possible to render pre-up, pre-down, post-up, or post-down snippets To manage notifications about this bug go to: https://bugs.launchpad.net/netplan/+bug/1664818/+subscriptions -- desktop-bugs mailing list desktop-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/desktop-bugs