diff --git a/src/etc/rc.newwanipv6 b/src/etc/rc.newwanipv6 index 7c3831a10..403b6b300 100755 --- a/src/etc/rc.newwanipv6 +++ b/src/etc/rc.newwanipv6 @@ -63,11 +63,11 @@ $interface_descr = convert_friendly_interface_to_friendly_descr($interface); /* make sure only one script runs at a time beyond this point */ $fp = fopen('/tmp/newwanipv6_' . $argument, 'a+'); if (!$fp || !flock($fp, LOCK_EX | LOCK_NB)) { - if ($force == 'yes') { - log_msg("Lost a forceful reload on {$interface_descr}[{$interface}]) due to previous lock", LOG_WARNING); + /* let go if not a forceful reload, otherwise block and wait */ + if ($force != 'yes' || (!$fp && !flock($fp, LOCK_EX))) { + fclose($fp); + return; } - fclose($fp); - return; } /* wait for DAD to complete to avoid discarding tentative address */