diff options
author | Ermal Luçi <eri@pfsense.org> | 2009-05-22 17:08:43 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2009-05-22 17:08:43 +0000 |
commit | 35e4f68e3c5919f8e85d6febcc01b22de1155da2 (patch) | |
tree | 583908bc30fef8f413047f88435b94b3cc16bf1a /etc | |
parent | d3b6dd4caf766cddf08cbc35ebdaaab1bdb5e0d3 (diff) | |
download | pfsense-35e4f68e3c5919f8e85d6febcc01b22de1155da2.zip pfsense-35e4f68e3c5919f8e85d6febcc01b22de1155da2.tar.gz |
Merge backup_vip_function to the synchronize code where its only used.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/pfsense-utils.inc | 23 | ||||
-rw-r--r-- | etc/rc.filter_synchronize | 23 |
2 files changed, 23 insertions, 23 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index 9025fd7..401787d 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -851,29 +851,6 @@ function backup_config_section($section) { } /* - * backup_vip_config_section($section): returns as an xml file string of - * the configuration section - */ -function backup_vip_config_section() { - global $config; - $new_section = &$config['virtualip']; - foreach($new_section['vip'] as $section) { - if($section['mode'] == "proxyarp") { - unset($section); - } - if($section['advskew'] <> "") { - $section_val = intval($section['advskew']); - $section_val=$section_val+100; - if($section_val > 255) - $section_val = 255; - $section['advskew'] = $section_val; - } - $temp['vip'][] = $section; - } - return $temp; -} - -/* * restore_config_section($section, new_contents): restore a configuration section, * and write the configuration out * to disk/cf. diff --git a/etc/rc.filter_synchronize b/etc/rc.filter_synchronize index 74acb3c..0459120 100644 --- a/etc/rc.filter_synchronize +++ b/etc/rc.filter_synchronize @@ -39,6 +39,29 @@ require_once("config.inc"); require_once("xmlrpc.inc"); +/* + * backup_vip_config_section($section): returns as an xml file string of + * the configuration section + */ +function backup_vip_config_section() { + global $config; + $new_section = &$config['virtualip']; + foreach($new_section['vip'] as $section) { + if($section['mode'] == "proxyarp") { + unset($section); + } + if($section['advskew'] <> "") { + $section_val = intval($section['advskew']); + $section_val=$section_val+100; + if($section_val > 255) + $section_val = 255; + $section['advskew'] = $section_val; + } + $temp['vip'][] = $section; + } + return $temp; +} + function remove_special_characters($string) { $match_array = ""; preg_match_all("/[a-zA-Z0-9\_\-]+/",$string,$match_array); |