summaryrefslogtreecommitdiffstats
path: root/etc/rc.linkup
diff options
context:
space:
mode:
authorErmal LUÇI <eri@pfsense.org>2014-11-26 20:37:55 +0100
committerErmal LUÇI <eri@pfsense.org>2014-11-26 20:37:55 +0100
commitac9f16ad4945141e8811e39152c2fc2d2f9dbc97 (patch)
tree876f0e07db7d2b6305c8a5e0b7733fbfedd2a93c /etc/rc.linkup
parent5e0a3256b291cc54d14dcb16c1b07018e1febd41 (diff)
downloadpfsense-ac9f16ad4945141e8811e39152c2fc2d2f9dbc97.zip
pfsense-ac9f16ad4945141e8811e39152c2fc2d2f9dbc97.tar.gz
Go through the same checks when called from command line and when called from fcgi.
Diffstat (limited to 'etc/rc.linkup')
-rwxr-xr-xetc/rc.linkup26
1 files changed, 14 insertions, 12 deletions
diff --git a/etc/rc.linkup b/etc/rc.linkup
index f700d58..86b6645 100755
--- a/etc/rc.linkup
+++ b/etc/rc.linkup
@@ -96,15 +96,18 @@ function handle_argument_group($iface, $argument2) {
}
if (platform_booting()) {
-if (isset($_GET['interface'])) {
- if (!empty($_GET['interface']))
- handle_argument_group(convert_real_interface_to_friendly_interface_name($_GET['interface']), $_GET['action']);
-} else {
- if ($argc < 3) {
- log_error("HOTPLUG event: The required number of parameters not passed!");
- return;
+ if (isset($_GET['interface'])) {
+ if (!empty($_GET['interface']))
+ $realiface = $_GET['interface'];
+ $action = $_GET['action'];
+ } else {
+ if ($argc < 3) {
+ log_error("HOTPLUG event: The required number of parameters not passed!");
+ return;
+ }
+ $action = $argv[1];
+ $realiface = $argv[2];
}
- $action = $argv[1];
switch($action) {
case "start":
case "stop":
@@ -115,16 +118,15 @@ if (isset($_GET['interface'])) {
/* NOTREACHED */
break;
}
- if (!empty($argv[2])) {
- if (substr($argv[2], 0, 4) == 'ovpn') {
+ if (!empty($realiface)) {
+ if (substr($realiface, 0, 4) == 'ovpn') {
log_error("Ignoring link event for ovpn interface");
return;
}
- $interface = convert_real_interface_to_friendly_interface_name($argv[2]);
+ $interface = convert_real_interface_to_friendly_interface_name($realiface);
if (!empty($interface))
handle_argument_group($interface, $action);
}
}
-}
?>
OpenPOWER on IntegriCloud