diff options
author | Ermal <eri@pfsense.org> | 2010-03-27 07:10:47 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2010-03-27 07:10:47 +0000 |
commit | 877fb374abca84970f6e3885cbbb95f9da75c83e (patch) | |
tree | 973bfa5f30accd2e05c06400023d658266e898b8 /etc | |
parent | f11237659b33293f8efdfc561293bef61826c1ea (diff) | |
download | pfsense-877fb374abca84970f6e3885cbbb95f9da75c83e.zip pfsense-877fb374abca84970f6e3885cbbb95f9da75c83e.tar.gz |
Ticket #447. Handle multiple instances propperly.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/pfsense-utils.inc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index e8dad4d..d484cfa 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -1321,7 +1321,8 @@ function get_interface_info($ifdescr) { if (file_exists("/dev/{$dev}")) { $ifinfo['ppplink'] = $dev; if (file_exists("{$g['varrun_path']}/mpd_{$if}.pid") && file_exists("{$g['varetc_path']}/mpd_{$if}.query")) { - $sec = trim(`/usr/bin/nc localhost 5005 < {$g['varetc_path']}/mpd_{$if}.query | grep 'Session time' | cut -f7 -d ' '`); + $pppid = substr($ifinfo['if'], 3); + $sec = trim(`/usr/bin/nc 127.0.0.1 500{$pppid} < {$g['varetc_path']}/mpd_{$if}.query | grep 'Session time' | cut -f7 -d ' '`); $ifinfo['ppp_uptime'] = convert_seconds_to_hms($sec); } $ifinfo['missing_device'] = 0; |