summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2011-06-24 10:52:28 -0400
committerjim-p <jimp@pfsense.org>2011-06-24 10:53:43 -0400
commit506514e77bf9823f965e70f6a1c9d8cdefd6413b (patch)
tree0c1efb070d9d8fa0b2d73c9b8da6f1b4fafd51bf /etc
parent5ca13f69b79ab1e461e7a689d7d02a8c2c0794eb (diff)
downloadpfsense-506514e77bf9823f965e70f6a1c9d8cdefd6413b.zip
pfsense-506514e77bf9823f965e70f6a1c9d8cdefd6413b.tar.gz
Add LB monitor types to config during upgrade, or they will be missing from boxes upgraded from 1.2.3.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/upgrade_config.inc40
1 files changed, 40 insertions, 0 deletions
diff --git a/etc/inc/upgrade_config.inc b/etc/inc/upgrade_config.inc
index 29f0ac0..9b349d3 100644
--- a/etc/inc/upgrade_config.inc
+++ b/etc/inc/upgrade_config.inc
@@ -842,6 +842,46 @@ function upgrade_044_to_045() {
function upgrade_045_to_046() {
global $config;
+ /* Load up monitors that are in the default config for 2.0 but not in 1.2.3
+ thus wouldn't be in an upgraded config. */
+ $config['load_balancer']['monitor_type'] = array (
+ array ( 'name' => 'ICMP',
+ 'type' => 'icmp',
+ 'descr' => 'ICMP',
+ 'options' => '',
+ ),
+ array ( 'name' => 'TCP',
+ 'type' => 'tcp',
+ 'descr' => 'Generic TCP',
+ 'options' => '',
+ ),
+ array ( 'name' => 'HTTP',
+ 'type' => 'http',
+ 'descr' => 'Generic HTTP',
+ 'options' =>
+ array ( 'path' => '/',
+ 'host' => '',
+ 'code' => '200',
+ ),
+ ),
+ array ( 'name' => 'HTTPS',
+ 'type' => 'https',
+ 'descr' => 'Generic HTTPS',
+ 'options' =>
+ array ( 'path' => '/',
+ 'host' => '',
+ 'code' => '200',
+ ),
+ ),
+ array ( 'name' => 'SMTP',
+ 'type' => 'send',
+ 'descr' => 'Generic SMTP',
+ 'options' =>
+ array ( 'send' => 'EHLO nosuchhost',
+ 'expect' => '250-',
+ ),
+ ),
+ );
/* Upgrade load balancer from slb to relayd */
if (is_array($config['load_balancer']['virtual_server']) && count($config['load_balancer']['virtual_server'])) {
$vs_a = &$config['load_balancer']['virtual_server'];
OpenPOWER on IntegriCloud