diff options
author | Ermal <eri@pfsense.org> | 2010-03-12 18:52:18 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2010-03-12 18:52:18 +0000 |
commit | 22299b2731a258e67f25b56adf5df10f94f9b75e (patch) | |
tree | 63a2f7c9fb88bfc4f63e1086c3d547002718ec96 /config | |
parent | e0953a42d46724313fdc072a16756d8909ddad77 (diff) | |
download | pfsense-packages-22299b2731a258e67f25b56adf5df10f94f9b75e.tar.gz pfsense-packages-22299b2731a258e67f25b56adf5df10f94f9b75e.tar.bz2 pfsense-packages-22299b2731a258e67f25b56adf5df10f94f9b75e.zip |
:
Diffstat (limited to 'config')
-rw-r--r-- | config/openospfd/openospfd.inc | 20 | ||||
-rw-r--r-- | config/openospfd/openospfd_interfaces.xml | 1 |
2 files changed, 20 insertions, 1 deletions
diff --git a/config/openospfd/openospfd.inc b/config/openospfd/openospfd.inc index e0764031..c131142a 100644 --- a/config/openospfd/openospfd.inc +++ b/config/openospfd/openospfd.inc @@ -27,6 +27,24 @@ POSSIBILITY OF SUCH DAMAGE. */ +function ospfd_display_friendlyiface () { + global $evaledvar, $config, $g; + + if (intval($g['latest_config']) >= 6) + return; + + if ($evaledvar) { + foreach ($evaledvar as $idx => $field) { + if ($field['interface']) { + if (empty($config['interfaces'][$field['interface']]['descr'])) + $evaledvar[$idx]['interface'] = strtoupper($evaledvar[$idx]['interface']); + else + $evaledvar[$idx]['interface'] = $config['interfaces'][$field['interface']]['descr']; + } + } + } +} + function ospfd_install_conf() { global $config, $g, $input_errors; @@ -222,4 +240,4 @@ function is_ospfd_running() { return false; } -?>
\ No newline at end of file +?> diff --git a/config/openospfd/openospfd_interfaces.xml b/config/openospfd/openospfd_interfaces.xml index e8b18fcf..445eefea 100644 --- a/config/openospfd/openospfd_interfaces.xml +++ b/config/openospfd/openospfd_interfaces.xml @@ -4,6 +4,7 @@ <title>Services: OpenOSPFd</title> <include_file>/usr/local/pkg/openospfd.inc</include_file> <aftersaveredirect>pkg.php?xml=openospfd_interfaces.xml</aftersaveredirect> + <custom_php_command_before_form>ospfd_display_friendlyiface();</custom_php_command_before_form> <additional_files_needed> <prefix>/usr/local/pkg/</prefix> <chmod>077</chmod> |