diff options
author | gnhb <gnoahb@gmail.com> | 2010-06-09 22:51:59 +0700 |
---|---|---|
committer | gnhb <gnoahb@gmail.com> | 2010-06-09 22:51:59 +0700 |
commit | 1d7e1d6c2c14a3ed728d8c1711587cf35dd107c2 (patch) | |
tree | 52876bbc776231199a053912e15db496d4482af8 /etc/inc/interfaces.inc | |
parent | 21e17a37a25554ff5b60543f538bb601e7630310 (diff) | |
download | pfsense-1d7e1d6c2c14a3ed728d8c1711587cf35dd107c2.zip pfsense-1d7e1d6c2c14a3ed728d8c1711587cf35dd107c2.tar.gz |
Fix up for new ptpid scheme and new iface naming scheme.
Diffstat (limited to 'etc/inc/interfaces.inc')
-rw-r--r-- | etc/inc/interfaces.inc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index a3f3449..08b57c2 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -882,10 +882,11 @@ function interfaces_ptpid_next() { function getMPDCRONSettings($pppif_) { global $config; + $cron_cmd_file = "{$g['varetc_path']}/pppoe_restart_"; if (is_array($config['cron']['item'])) { for ($i = 0; $i < count($config['cron']['item']); $i++) { $item = $config['cron']['item'][$i]; - if (strpos($item['command'], $pppif_) !== false) { + if (strpos($item['command'], $cron_cmd_file.$pppif_) !== false) { return array("ID" => $i, "ITEM" => $item); } } @@ -901,7 +902,7 @@ function handle_pppoe_reset($post_array) { $pppif = $post_array['type'].$post_array['ptpid']; if (!is_array($config['cron']['item'])) $config['cron']['item'] = array(); - $itemhash = getMPDCRONSettings($cron_cmd_file.$pppif); + $itemhash = getMPDCRONSettings($pppif); $item = $itemhash['ITEM']; // reset cron items if necessary and return @@ -969,7 +970,7 @@ function handle_pppoe_reset($post_array) { } // end switch } else { /* test whether a cron item exists and unset() it if necessary */ - $itemhash = getMPDCRONSettings($cron_cmd_file.$pppif); + $itemhash = getMPDCRONSettings($pppif); $item = $itemhash['ITEM']; if (isset($item)) unset($config['cron']['item'][$itemhash['ID']]); |