diff options
Diffstat (limited to 'etc/rc.linkup')
-rwxr-xr-x | etc/rc.linkup | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/etc/rc.linkup b/etc/rc.linkup index 6cc1581..59e2089 100755 --- a/etc/rc.linkup +++ b/etc/rc.linkup @@ -110,6 +110,7 @@ if (isset($_GET['interface'])) { $action = $argv[1]; $realiface = $argv[2]; } + switch($action) { case "start": case "stop": @@ -120,11 +121,13 @@ default: /* NOTREACHED */ break; } + if (!empty($realiface)) { if (substr($realiface, 0, 4) == 'ovpn') { log_error("Ignoring link event for ovpn interface"); return; } + $rclinkuplock = lock("rclinkup{$realiface}", LOCK_EX); $interface = convert_real_interface_to_friendly_interface_name($realiface); if (!empty($interface)) handle_argument_group($interface, $action); @@ -145,6 +148,6 @@ if (!empty($realiface)) { } } } + unlock($rclinkuplock); } - ?> |