diff options
author | Ermal <eri@pfsense.org> | 2011-03-15 21:30:35 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2011-03-15 21:31:03 +0000 |
commit | e58da189b45242c57ba8b186c0209087cfa67c11 (patch) | |
tree | bf79827133390dfc1334fa7e73f21e4c7e053d37 /etc | |
parent | 401fb0ad8fa7ad06743435808dac8e913b3c16bb (diff) | |
download | pfsense-e58da189b45242c57ba8b186c0209087cfa67c11.zip pfsense-e58da189b45242c57ba8b186c0209087cfa67c11.tar.gz |
Add code to allow custom upgrade code to run after the pfSense upgrade code for the same version switching(Just the custom upgrade functions should have _custom at the end of their name.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/config.lib.inc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/etc/inc/config.lib.inc b/etc/inc/config.lib.inc index 2edcea3..11e1ec3 100644 --- a/etc/inc/config.lib.inc +++ b/etc/inc/config.lib.inc @@ -397,12 +397,17 @@ function convert_config() { include_once('auth.inc'); include_once('upgrade_config.inc'); + if (file_exists("/etc/inc/upgrade_config_custom.inc")) + include_once("upgrade_config_custom.inc"); /* Loop and run upgrade_VER_to_VER() until we're at current version */ while ($config['version'] < $g['latest_config']) { $cur = $config['version'] * 10; $next = $cur + 1; $migration_function = sprintf('upgrade_%03d_to_%03d', $cur, $next); $migration_function(); + $migration_function = "{$migration_function}_custom"; + if (function_exists($migration_function)) + $migration_function(); $config['version'] = sprintf('%.1f', $next / 10); if($g['booting']) echo "."; @@ -847,4 +852,4 @@ function set_device_perms() { } } -?>
\ No newline at end of file +?> |