diff options
author | Ermal Luçi <eri@pfsense.org> | 2008-06-04 21:39:07 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2008-06-04 21:39:07 +0000 |
commit | 730a49b501680992353ebe2f853f1eb8b4da5584 (patch) | |
tree | 73ce8d9b94f180b245ca03321b94484c8ed21f75 | |
parent | a3f9082f46e573fab5b600a94ed8f721a9f6c74d (diff) | |
download | pfsense-730a49b501680992353ebe2f853f1eb8b4da5584.zip pfsense-730a49b501680992353ebe2f853f1eb8b4da5584.tar.gz |
Compat shims to convert old vlan configs to the new one.
Actually only one tag <vlanif>$if</vlanif> is added.
-rw-r--r-- | etc/inc/config.inc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/etc/inc/config.inc b/etc/inc/config.inc index be2ffea..b4f4eab 100644 --- a/etc/inc/config.inc +++ b/etc/inc/config.inc @@ -1216,6 +1216,15 @@ function convert_config() { $config['version'] = "4.4"; } + /* Convert 4.4 -> 4.5 */ + if ($config['version'] <= 4.4) { + if (is_array($config['vlans']['vlan']) && count($config['vlans']['vlan'])) { + foreach ($config['vlans']['vlan'] as $id => $vlan) + $vlan['vlanif'] = "vlan{$id}"; + } + $config['version'] = "4.5"; + } + if ($prev_version != $config['version']) write_config("Upgraded config version level from {$prev_version} to {$config['version']}"); } @@ -2113,4 +2122,4 @@ function set_device_perms() { if($g['booting']) echo "."; $config = parse_config(); -?>
\ No newline at end of file +?> |