diff options
author | Ermal <eri@pfsense.org> | 2013-11-25 13:48:10 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2013-11-25 14:06:36 +0000 |
commit | 0a806969ee3084472be5864a513c3e6fb30097a0 (patch) | |
tree | c06e41656ccb2611308880961f36443059ba0897 /etc/inc | |
parent | 06dc05ace7381808d8585c27f57894b0b8a2e70c (diff) | |
download | pfsense-0a806969ee3084472be5864a513c3e6fb30097a0.zip pfsense-0a806969ee3084472be5864a513c3e6fb30097a0.tar.gz |
Since zoneid need to be less then 4096 provide some upgrade code to handle that from existing configs
Diffstat (limited to 'etc/inc')
-rw-r--r-- | etc/inc/globals.inc | 2 | ||||
-rw-r--r-- | etc/inc/upgrade_config.inc | 17 |
2 files changed, 18 insertions, 1 deletions
diff --git a/etc/inc/globals.inc b/etc/inc/globals.inc index 289f04d..a836680 100644 --- a/etc/inc/globals.inc +++ b/etc/inc/globals.inc @@ -72,7 +72,7 @@ $g = array( "disablecrashreporter" => false, "crashreporterurl" => "http://crashreporter.pfsense.org/crash_reporter.php", "debug" => false, - "latest_config" => "10.4", + "latest_config" => "10.5", "nopkg_platforms" => array("cdrom"), "minimum_ram_warning" => "101", "minimum_ram_warning_text" => "128 MB", diff --git a/etc/inc/upgrade_config.inc b/etc/inc/upgrade_config.inc index 53d0cd8..8f2104b 100644 --- a/etc/inc/upgrade_config.inc +++ b/etc/inc/upgrade_config.inc @@ -3247,4 +3247,21 @@ function upgrade_103_to_104() { local_sync_accounts(); } +function upgrade_104_to_105() { + global $config; + + if (is_array($config['captiveportal'])) { + $zoneid = 2; + foreach ($config['captiveportal'] as $cpzone => $cpcfg) { + if (empty($cpfg['zoneid'])) { + $config['captiveportal'][$cpzone]['zoneid'] = $zoneid; + $zoneid += 2; + } else if ($cpcfg['zoneid'] > 4000) { + $config['captiveportal'][$cpzone]['zoneid'] = $zoneid; + $zoneid += 2; + } + } + } +} + ?> |