1
0
mirror of https://github.com/CumulusNetworks/ifupdown2.git synced 2024-05-06 15:54:50 +00:00

Use closefds=True and shell=True when executing usercmds

Ticket: CM-1438
Reviewed By: reported by purna
Testing Done: Tested with purna's l2 l3 lag test

problem fixed by this patch:
In some cases the child processes executing user cmds seem to hold on to
the lock file fd for a lil longer, preventing another instance of
ifupdown from running immediately after. Seen with two immediate
instances of service networking restarts from scripts when the
interfaces file has many user cmds.
This commit is contained in:
Roopa Prabhu
2014-06-01 11:12:06 -07:00
parent 4c399f5562
commit 3e95a3dab5

View File

@@ -153,7 +153,7 @@ stop)
check_network_swap
log_action_begin_msg "Deconfiguring network interfaces"
if ifdown -a --exclude=lo $verbose --perfmode; then
if ifdown -a --exclude=lo $verbose; then
log_action_end_msg $?
else
log_action_end_msg $?
@@ -190,10 +190,10 @@ restart)
ifupdown_init
log_action_begin_msg "Reconfiguring network interfaces"
ifdown -a --exclude=lo $verbose --perfmode || true
ifdown -a --exclude=lo $verbose || true
set -f
exclusions=$(process_exclusions)
if ifup -a --exclude=lo $verbose --perfmode
if ifup -a --exclude=lo $verbose
then
log_action_end_msg $?
else