summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorChris Buechler <cmb@cmb-macbook-pro.local>2009-03-09 22:14:25 -0400
committerChris Buechler <cmb@cmb-macbook-pro.local>2009-03-09 22:14:25 -0400
commitf2a5b5e467caa99c78939eea236f0036031a499a (patch)
tree9a6b3e9c0d300dcfa4624d15e0e24233fe753d89 /etc
parentac33db20c510fcdd8b810b0fed0aa8e1867beaf5 (diff)
downloadpfsense-f2a5b5e467caa99c78939eea236f0036031a499a.zip
pfsense-f2a5b5e467caa99c78939eea236f0036031a499a.tar.gz
Fix display of DHCP status on Status -> Interfaces
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/interfaces.inc5
-rw-r--r--etc/inc/pfsense-utils.inc9
-rw-r--r--etc/inc/service-utils.inc3
3 files changed, 11 insertions, 6 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index f825bdd..9ceb592 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -1244,9 +1244,8 @@ function kill_wpasupplicant($interface) {
}
function find_dhclient_process($interface) {
- $realinterface = get_real_interface($interface);
- if($realinterface)
- $pid = `ps awwwux | grep dhclient | grep -v grep | grep {$realinterface} | awk '{ print \$2 }'`;
+ if($interface)
+ $pid = `ps awwwux | grep dhclient | grep -v grep | grep {$interface} | awk '{ print \$2 }'`;
return $pid;
}
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index 1e2e775..03b63eb 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -3048,6 +3048,13 @@ function get_interface_info($ifdescr) {
switch ($config['interfaces'][$if]['ipaddr']) {
/* DHCP? -> see if dhclient is up */
case "dhcp":
+ /* see if dhclient is up */
+ if (is_dhcp_running($ifinfo['if']) == true)
+ $ifinfo['dhcplink'] = "up";
+ else
+ $ifinfo['dhcplink'] = "down";
+
+ break;
case "carpdev-dhcp":
/* see if dhclient is up */
if (is_dhcp_running($ifinfo['if']) == true)
@@ -3502,4 +3509,4 @@ function compare_hostname_to_dnscache($hostname) {
}
-?>
+?> \ No newline at end of file
diff --git a/etc/inc/service-utils.inc b/etc/inc/service-utils.inc
index af94452..8c59dc2 100644
--- a/etc/inc/service-utils.inc
+++ b/etc/inc/service-utils.inc
@@ -149,7 +149,6 @@ function is_pid_running($pidfile) {
}
function is_dhcp_running($interface) {
- $interface = convert_friendly_interface_to_real_interface_name($interface);
$status = find_dhclient_process($interface);
if($status <> "")
return true;
@@ -187,4 +186,4 @@ function is_service_running($service, $ps = "") {
}
}
-?>
+?> \ No newline at end of file
OpenPOWER on IntegriCloud