summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStephen Beaver <sbeaver@netgate.com>2016-03-19 09:56:37 -0400
committerStephen Beaver <sbeaver@netgate.com>2016-03-19 09:56:37 -0400
commitb76cc9789b2216a94d6fb8a110946f95b6a5a1e0 (patch)
treeef943f6f14e8ec098a6ef80b979dc7e01c858e89 /src
parent78d168ceccff8a45da76df2a8487d0f1b1910779 (diff)
downloadpfsense-b76cc9789b2216a94d6fb8a110946f95b6a5a1e0.zip
pfsense-b76cc9789b2216a94d6fb8a110946f95b6a5a1e0.tar.gz
Fixed #6012
Config upgrade function replaces space with underscore in group names
Diffstat (limited to 'src')
-rw-r--r--src/etc/inc/globals.inc2
-rw-r--r--src/etc/inc/upgrade_config.inc23
2 files changed, 18 insertions, 7 deletions
diff --git a/src/etc/inc/globals.inc b/src/etc/inc/globals.inc
index 32cf355..1c666b2 100644
--- a/src/etc/inc/globals.inc
+++ b/src/etc/inc/globals.inc
@@ -99,7 +99,7 @@ $g = array(
"disablecrashreporter" => false,
"crashreporterurl" => "https://crashreporter.pfsense.org/crash_reporter.php",
"debug" => false,
- "latest_config" => "14.7",
+ "latest_config" => "14.8",
"nopkg_platforms" => array("cdrom"),
"minimum_ram_warning" => "101",
"minimum_ram_warning_text" => "128 MB",
diff --git a/src/etc/inc/upgrade_config.inc b/src/etc/inc/upgrade_config.inc
index c96e4c4..7767c43 100644
--- a/src/etc/inc/upgrade_config.inc
+++ b/src/etc/inc/upgrade_config.inc
@@ -4318,7 +4318,7 @@ function upgrade_137_to_138() {
global $config;
// the presence of unityplugin tag used to disable loading of unity plugin
- // it's now disabled by default, and config tag is to enable. Unset accordingly.
+ // it's now disabled by default, and config tag is to enable. Unset accordingly.
if (is_array($config['ipsec'])) {
if (isset($config['ipsec']['unityplugin'])) {
unset($config['ipsec']['unityplugin']);
@@ -4330,7 +4330,7 @@ function upgrade_138_to_139() {
global $config;
// clean up state killing on gateway failure. having kill_states set used to mean it was disabled
- // now set gw_down_kill_states if enabled.
+ // now set gw_down_kill_states if enabled.
if (!isset($config['system']['kill_states'])) {
$config['system']['gw_down_kill_states'] = true;
} else {
@@ -4353,7 +4353,7 @@ function upgrade_139_to_140() {
}
function upgrade_140_to_141() {
- global $config;
+ global $config;
// retain OpenVPN's net30 default topology for upgraded client configs so they still work
if (is_array($config['openvpn']) && is_array($config['openvpn']['openvpn-client'])) {
@@ -4573,9 +4573,9 @@ function upgrade_143_to_144() {
function upgrade_144_to_145() {
global $config;
- // Enable DHCPv6 server and radvd config for track6 interfaces,
- // matching what used to be automatically enabled with no user
- // configurability.
+ // Enable DHCPv6 server and radvd config for track6 interfaces,
+ // matching what used to be automatically enabled with no user
+ // configurability.
if (is_array($config['interfaces'])) {
foreach ($config['interfaces'] as $ifname => $ifcfg) {
if (isset($ifcfg['enable'])) {
@@ -4712,4 +4712,15 @@ function upgrade_146_to_147() {
upgrade_quagga_146_to_147();
}
+function upgrade_147_to_148() {
+ global $config;
+
+ // Ensure there are no spaces in group names by
+ // replacing spaces with underscores
+ if (is_array($config['system']['group'])) {
+ foreach ($config['system']['group'] as $grp) {
+ $grp['name'] = str_replace(" ", "_", $grp['name']);
+ }
+ }
+}
?>
OpenPOWER on IntegriCloud