summaryrefslogtreecommitdiffstats
path: root/etc/rc.linkup
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-02-02 17:30:22 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-02-02 17:30:22 +0000
commitadab3c25f5fa209dac918ac50be476434d0fcfdf (patch)
tree2daba27f7f5aa392777a6c3e4f6c404e30a60a03 /etc/rc.linkup
parentf1bee6b5f4b97ace129db4283053898d460d492f (diff)
downloadpfsense-adab3c25f5fa209dac918ac50be476434d0fcfdf.zip
pfsense-adab3c25f5fa209dac918ac50be476434d0fcfdf.tar.gz
Instead of echoing out the value where nobody will see it, send it to log_error() so we can ensure the values are correct and aide in debugging this dhclient issue.
Diffstat (limited to 'etc/rc.linkup')
-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