Question

/etc/network/if-pre-up.d and if-post-down.d command not executed after upgrade to Ubuntu 20.04

I just upgraded a droplet from Ubuntu 18.04 to 20.04 via do-release-upgrade.

I have commands /etc/network/if-pre-up.d/iptablesload and /etc/network/if-post-down.d/iptablessave which are intended to save and restore iptables over a reboot. These worked fine on Ubuntu 18.04 and still work fine if run manually, but they don’t run automatically on reboot. I don’t know if any other if-down.d/, if-post-down.d/, if-pre-up.d/ or if-up.d/ commands are run. They may or may not not be.

I expect something is missing as I have no man pages for ‘interfaces’, ‘ifup’ or ‘ifdown’ either.


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

With a update I lost connection and after the reboot the network was not working. And via the Droplet -> Networking -> Revovery console:

ifdown eth0
ifup eth0

I had network running:-)

I noticed the some modules for cloud-init where missing.

apt purge cloud-init
apt install cloud-init

Fixed the problem.

SOLVED

Apparently after the upgrade ‘apt autoremove’ removed ‘ifupdown:amd64 0.8.35ubuntu1’

‘apt install ifupdown’ fixed the issue.