In one of the script i have seen the ifdown command with timeout
timeout 20 ifdown eth0 --force
for what purpose the timeout may be useful?
In case there is an ifup
active it would interfere with the ifdown
command. Waiting 20 seconds would avoid this (ifup
is likely to finish or error out without 20 seconds).
As an example: OpenVSwitch uses it.
man timeout
– waltinator May 04 '17 at 06:55