summaryrefslogtreecommitdiffstats
path: root/etc/inc/interfaces.inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-03-31 22:53:35 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-03-31 22:53:35 +0000
commitd04d8d428065d52506faa1c3f449ef951b0a0bde (patch)
treeaa4665ab0380b44e49f51b5c3250a651a333df65 /etc/inc/interfaces.inc
parent0d77165262f33a2a66968413848c3071d22c95e4 (diff)
downloadpfsense-d04d8d428065d52506faa1c3f449ef951b0a0bde.zip
pfsense-d04d8d428065d52506faa1c3f449ef951b0a0bde.tar.gz
Set /tmp/$interface_router even for non DHCP items.
Diffstat (limited to 'etc/inc/interfaces.inc')
-rw-r--r--etc/inc/interfaces.inc12
1 files changed, 12 insertions, 0 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index ef42bbc..cfd9f4e 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -272,8 +272,14 @@ function interfaces_optional_configure_if($opti) {
$optdescr = " ({$optcfg['descr']})";
print "\tOPT{$opti}{$optdescr}... ";
}
+
+ if(file_exists("/tmp/{$optcfg['if']}_router"))
+ unlink("/tmp/{$optcfg['if']}_router");
if (isset($optcfg['enable'])) {
+ if($optcfg['gateway'])
+ system("echo " . $optcfg['gateway'] . " > /tmp/" . $optcfg['if'] . "_router");
+
/* wireless configuration? */
if (is_array($optcfg['wireless']))
interfaces_wireless_configure($optcfg['if'], $optcfg['wireless']);
@@ -875,6 +881,9 @@ function interfaces_wan_configure() {
$wancfg = $config['interfaces']['wan'];
+ if(file_exists("/tmp/{$config['interfaces']['wan']['if']}_router"))
+ unlink("/tmp/{$config['interfaces']['wan']['if']}_router");
+
if(!$g['booting']) {
mute_kernel_msgs();
@@ -963,6 +972,9 @@ function interfaces_wan_configure() {
escapeshellarg($wancfg['ipaddr'] . "/" . $wancfg['subnet']));
}
+ if($config['interfaces']['wan']['gateway'])
+ system("echo " . $config['interfaces']['wan']['gateway'] . " > /tmp/" . $config['interfaces']['wan']['if'] . "_router");
+
/* resync pf (done automatically for DHCP/PPPoE/PPTP) */
filter_configure();
}
OpenPOWER on IntegriCloud