mirror of
https://github.com/CumulusNetworks/ifupdown2.git
synced 2024-05-06 15:54:50 +00:00
Scripts in /etc/network/ are executed using `exec_command` which captures stdout by default, and thus waits for stdout end-of-file via `Popen.communicate()`. However, this can cause hangs if the network script executes a long-running command in the background. Can be reproduced by putting the following (executable) script in /etc/network/if-up.d/: #!/bin/sh sleep 5& This script will cause `ifreload -a` to wait for 5 seconds per network interface. To avoid waiting, do not capture stdout when executing /etc/network/ scripts. This also improves compatibility with ifupdown, which runs the above script in the background. Signed-off-by: Friedrich Weber <f.weber@proxmox.com>