summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorBill Marquette <billm@pfsense.org>2005-03-10 05:19:37 +0000
committerBill Marquette <billm@pfsense.org>2005-03-10 05:19:37 +0000
commit88f66e13fc2e8b28b5371145034a77e8d0db27f8 (patch)
tree98ec59c841badcbc25575368cba5e995f8a5fa07 /etc
parent2f948e1c2af0c877bcc0770fb7101805234c2831 (diff)
downloadpfsense-88f66e13fc2e8b28b5371145034a77e8d0db27f8.zip
pfsense-88f66e13fc2e8b28b5371145034a77e8d0db27f8.tar.gz
Move default gateway out of wan config to system config (leave in gui though)
Remove scheduler config from interfaces Bump config file version to 1.5
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/config.inc25
-rw-r--r--etc/inc/globals.inc2
-rw-r--r--etc/inc/interfaces.inc2
3 files changed, 26 insertions, 3 deletions
diff --git a/etc/inc/config.inc b/etc/inc/config.inc
index b8e83fd..6dbbd78 100644
--- a/etc/inc/config.inc
+++ b/etc/inc/config.inc
@@ -424,6 +424,29 @@ function convert_config() {
$config['version'] = "1.4";
}
+ /* Convert 1.4 -> 1.5 */
+ if ($config['version'] == "1.4") {
+
+ /* Default route moved */
+ if (isset($config['interfaces']['wan']['gateway']))
+ if ($config['interfaces']['wan']['gateway'] <> "")
+ $config['system']['gateway'] = $config['interfaces']['wan']['gateway'];
+ unset($config['interfaces']['wan']['gateway']);
+
+ /* Queues are no longer interface specific */
+ if (isset($config['interfaces']['lan']['schedulertype']))
+ unset($config['interfaces']['lan']['schedulertype']);
+ if (isset($config['interfaces']['wan']['schedulertype']))
+ unset($config['interfaces']['wan']['schedulertype']);
+
+ for ($i = 1; isset($config['interfaces']['opt' . $i]); $i++) {
+ if(isset($config['interfaces']['opt' . $i]['schedulertype']))
+ unset($config['interfaces']['opt' . $i]['schedulertype']);
+ }
+
+ $config['version'] = "1.5";
+ }
+
write_config();
if ($g['booting'])
@@ -845,4 +868,4 @@ function system_start_ftp_helpers() {
}
-?> \ No newline at end of file
+?>
diff --git a/etc/inc/globals.inc b/etc/inc/globals.inc
index 904194e..42a03d9 100644
--- a/etc/inc/globals.inc
+++ b/etc/inc/globals.inc
@@ -50,7 +50,7 @@ $g = array(
"n_pptp_units" => 16,
"pptp_subnet" => 28,
"debug" => false,
- "latest_config" => "1.4",
+ "latest_config" => "1.5",
"nopccard_platforms" => array("wrap", "net48xx"),
"pkg_config_location" => "http://www.pfsense.com/packages/pkg_config.xml"
);
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index 313c967..96d4a87 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -391,7 +391,7 @@ function interfaces_wan_configure() {
}
/* install default route */
mwexec("/sbin/route delete default");
- mwexec("/sbin/route add default " . escapeshellarg($wancfg['gateway']));
+ mwexec("/sbin/route add default " . escapeshellarg($config['system']['gateway']));
/* resync ipfilter (done automatically for DHCP/PPPoE/PPTP) */
filter_resync();
OpenPOWER on IntegriCloud