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/upgrade_config.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/upgrade_config.inc')
-rw-r--r-- | etc/inc/upgrade_config.inc | 17 |
1 files changed, 17 insertions, 0 deletions
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; + } + } + } +} + ?> |