summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xetc/rc.linkup18
1 files changed, 9 insertions, 9 deletions
diff --git a/etc/rc.linkup b/etc/rc.linkup
index 6da753d..251359f 100755
--- a/etc/rc.linkup
+++ b/etc/rc.linkup
@@ -2,7 +2,7 @@
<?php
/*
rc.linkup - devd hotplug actions
- part of pfSense
+ part of pfSense
Copyright (C) 2003-2005 Scott Ullrich <sullrich@gmail.com>.
All rights reserved.
@@ -43,7 +43,7 @@
if($argv[$counter] == "" or $argv[$counter] == "\n") {
exit;
}
- echo "Processing {$argv[$counter]} - {$argv[$counter+1]}\n";
+ log_error("Processing {$argv[$counter]} - {$argv[$counter+1]}\n");
$friendly_interface = convert_real_interface_to_friendly_interface_name($argv[$counter]);
if($config['interfaces'][$friendly_interface]['ipaddr'] <> "dhcp" and
$config['interfaces'][$friendly_interface]['ipaddr'] <> "pppoe" and
@@ -53,26 +53,26 @@
$counter++;
$counter++;
} else {
-
+
if($argv[$counter+1] == "stop" or $argv[$counter+1] == "down") {
log_error("DEVD Ethernet detached event for {$argv[$counter]}");
exec("/sbin/ifconfig {$argv[$counter]} delete");
exec("/usr/sbin/arp -da");
}
-
+
if($argv[$counter+1] == "start" or $argv[$counter+1] == "up") {
log_error("DEVD Ethernet attached event for {$argv[$counter]}");
exec("/sbin/ifconfig {$argv[$counter]} up");
exec("/usr/sbin/arp -da");
}
-
+
if($argv[$counter] <> "") {
$interface = convert_real_interface_to_friendly_interface_name($argv[$counter]);
} else {
log_error("WARNING: No interface passed to rc.linkup");
$interface = "wan";
}
-
+
if($interface == "wan") {
if($config['interfaces'][$friendly_interface]['ipaddr'] <> "pppoe") {
/* do not reconfigure on hotplug events when using pppoe */
@@ -84,13 +84,13 @@
interfaces_lan_configure();
} else {
$int = str_replace("opt", "", $interface);
- interfaces_optional_configure_if($int);
+ interfaces_optional_configure_if($int);
echo "interfaces_optional_configure_if($int);\n";
log_error("HOTPLUG: Configuring optional interface {$interface}");
}
-
+
+ $counter++;
$counter++;
- $counter++;
}
}
}
OpenPOWER on IntegriCloud