summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
authorSeth Mos <seth.mos@xs4all.nl>2009-06-07 00:43:19 +0200
committerSeth Mos <seth.mos@xs4all.nl>2009-06-07 00:45:45 +0200
commit2523c9231878ff2d001129a7273075674d09034a (patch)
treecdb6a6028c2bdf5b76ee910ce4bf39a1e821058a /etc/inc
parent2e87b9d9266f6372c7df00a486831762e7bca34c (diff)
downloadpfsense-2523c9231878ff2d001129a7273075674d09034a.zip
pfsense-2523c9231878ff2d001129a7273075674d09034a.tar.gz
Since we still needed upgrade code for vlans from 1.2 to 2.0 I added the upgrade at spot number 39 which is just before the user manager upgrade code.
This should make sure that we won't accidentally try to convert a 2.0 install. Good thing we left some spots open! This is blind coded upgrade code path, it needs testing and I need some volunteers to help please.
Diffstat (limited to 'etc/inc')
-rw-r--r--etc/inc/upgrade_config.inc17
1 files changed, 16 insertions, 1 deletions
diff --git a/etc/inc/upgrade_config.inc b/etc/inc/upgrade_config.inc
index 8fd43b0..460c77e 100644
--- a/etc/inc/upgrade_config.inc
+++ b/etc/inc/upgrade_config.inc
@@ -591,7 +591,19 @@ function upgrade_037_to_038() {
function upgrade_038_to_039() {
global $config;
- /* Insert upgrade code here */
+
+ /* This should only be valid when upgrading vlans from a 1.2 config though */
+ /* Vlan upgrade code. Since we now create vlans with a vlanif tag we just start at 0 */
+ $a_vlans = array();
+ $vlan_counter = 0;
+ if (is_array($config['vlans'])) {
+ foreach ($config['vlans'] as & $vlan) {
+ $a_vlans[$vlan_counter] = $vlan;
+ $a_vlans[$vlan_counter]['vlanif] = "vlan{$vlan_counter}";
+ $vlan_counter++;
+ }
+ $config['vlans'] = $a_vlans;
+ }
}
@@ -1739,4 +1751,7 @@ function upgrade_058_to_059() {
$schedl['schedlabel'] = uniqid();
}
}
+
+function upgrade_059_to_060() {
+
?>
OpenPOWER on IntegriCloud