The original post: /r/debian by /u/Dolapevich on 2025-03-12 21:40:38.

When I ifup eth1 it fails because a script within if-up.d runs before the interface is configured.

Can anyone think of reason?

According to the man page if-up.d should be ran after the iface is configured.

/etc/network/if-up.d/ Scripts in this directory are run after bringing the interface up.

This is a test run:


ifup -v eth1
============

ifup: parsing file /etc/network/interfaces.d/50-cloud-init

ifup: configuring interface eth1=eth1 (inet)
/bin/run-parts --exit-on-error --verbose /etc/network/if-pre-up.d

/sbin/ip link set dev eth1 up 2>/dev/null || true
/bin/run-parts --exit-on-error --verbose /etc/network/if-up.d
run-parts: executing /etc/network/if-up.d/000resolvconf
run-parts: executing /etc/network/if-up.d/50ovhNA
Error: Nexthop has invalid gateway.
Error: Nexthop has invalid gateway.
run-parts: /etc/network/if-up.d/50ovhNA exited with return code 2
ifup: failed to bring up eth1