Fix ifup waiting for lock on /run/network/ifstate.eth0

After upgrading debian on a virtual machine, it was not booting properly anymore. The boot console showed

ifup waiting for lock on /run/network/interfaces/ ifstate.eth0

before coming to a login prompt. This can happen, if your network interface (in this case eth0) is configured on ‘allow-hotplug’ instead of ‘auto’ in /etc/network/interfaces. For comparison I suggest a quick search https://lmgtfy.com/?q=allow-hotplug+vs+auto, but apparently auto is the right setting for a build in nic. So you either have to boot some rescue system in order to change the /etc/network/interfaces configuration file, or in case of a virtual machine shut down the vm and mount the filesystem on the host.