Feature #447 » pfsense-utils.inc.patch.txt
1 |
--- backup-stock-image-20100320/inc/pfsense-utils.inc 2010-03-23 13:42:51.000000000 +0700 |
---|---|
2 |
+++ pfsense-utils.inc.new 2010-03-22 18:44:16.000000000 +0700 |
3 |
@@ -1299,15 +1298,17 @@ |
4 |
$ifinfo['pptplink'] = "down"; |
5 |
break; |
6 |
/* PPP interface? -> get uptime for this session and cumulative uptime from the persistant log file in conf */ |
7 |
- case "": |
8 |
+ case "ppp": |
9 |
if ($config['interfaces'][$if]['serialport']){ |
10 |
$dev = $config['interfaces'][$if]['serialport']; |
11 |
if (file_exists("/dev/{$dev}")){ |
12 |
$ifinfo['ppplink'] = $dev; |
13 |
|
14 |
if (file_exists("/var/run/{$dev}.sock") && file_exists("/var/run/{$dev}.if")){ |
15 |
- $ifinfo['ppp_uptime'] = `/usr/sbin/pppctl /var/run/$dev.sock show physical | grep 'Connect time' | cut -c 15-`; |
16 |
- } //else if (`/sbin/ifconfig |
17 |
+ $ifinfo['ppp_uptime'] = trim(`/usr/sbin/pppctl /var/run/$dev.sock bg echo UPTIME`); |
18 |
+ if (stristr($ifinfo['ppp_uptime'],">")) |
19 |
+ $ifinfo['ppp_uptime'] = substr($ifinfo['ppp_uptime'], 2 + strpos($ifinfo['ppp_uptime'], ">")); |
20 |
+ } |
21 |
$ifinfo['missing_device'] = 0; |
22 |
} |
23 |
else{ |