1
|
#!/usr/local/bin/php-cgi -f
|
2
|
<?php
|
3
|
/*
|
4
|
* rc.interfaces_wan_configure
|
5
|
*
|
6
|
* part of pfSense (https://www.pfsense.org)
|
7
|
* Copyright (c) 2004-2016 Electric Sheep Fencing, LLC
|
8
|
* All rights reserved.
|
9
|
*
|
10
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
* you may not use this file except in compliance with the License.
|
12
|
* You may obtain a copy of the License at
|
13
|
*
|
14
|
* http://www.apache.org/licenses/LICENSE-2.0
|
15
|
*
|
16
|
* Unless required by applicable law or agreed to in writing, software
|
17
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
* See the License for the specific language governing permissions and
|
20
|
* limitations under the License.
|
21
|
*/
|
22
|
|
23
|
require_once("config.inc");
|
24
|
require_once("functions.inc");
|
25
|
require_once("filter.inc");
|
26
|
require_once("shaper.inc");
|
27
|
|
28
|
if (isset($_GET['interface'])) {
|
29
|
$argument = $_GET['interface'];
|
30
|
} else {
|
31
|
$argument = str_replace("\n", "", $argv[1]);
|
32
|
}
|
33
|
if (empty($argument)) {
|
34
|
interface_configure("wan");
|
35
|
} else {
|
36
|
if (!empty($config['interfaces'][$argument])) {
|
37
|
interface_configure($argument);
|
38
|
}
|
39
|
}
|
40
|
|
41
|
?>
|