Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
811cf082
Commit
811cf082
authored
Jul 04, 2016
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
src: prune comments and correct misalignments
parent
77578606
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
19 deletions
+4
-19
interfaces.inc
src/etc/inc/interfaces.inc
+1
-4
upgrade_config.inc
src/etc/inc/upgrade_config.inc
+1
-6
vslb.inc
src/etc/inc/vslb.inc
+0
-5
diag_backup.php
src/www/diag_backup.php
+2
-4
No files found.
src/etc/inc/interfaces.inc
View file @
811cf082
...
@@ -2812,10 +2812,7 @@ function interface_configure($interface = 'wan', $reloadall = false, $linkupeven
...
@@ -2812,10 +2812,7 @@ function interface_configure($interface = 'wan', $reloadall = false, $linkupeven
mwexec
(
"/sbin/ifconfig "
.
escapeshellarg
(
$realhwif
)
.
mwexec
(
"/sbin/ifconfig "
.
escapeshellarg
(
$realhwif
)
.
" link "
.
escapeshellarg
(
$wancfg
[
'spoofmac'
]));
" link "
.
escapeshellarg
(
$wancfg
[
'spoofmac'
]));
/*
/* All vlans need to spoof their parent mac address, too. */
* All vlans need to spoof their parent mac address, too. see
* ticket #1514: http://cvstrac.pfsense.com/tktview?tn=1514,33
*/
if
(
isset
(
$config
[
'vlans'
][
'vlan'
]))
{
if
(
isset
(
$config
[
'vlans'
][
'vlan'
]))
{
foreach
(
$config
[
'vlans'
][
'vlan'
]
as
$vlan
)
{
foreach
(
$config
[
'vlans'
][
'vlan'
]
as
$vlan
)
{
if
(
$vlan
[
'if'
]
==
$realhwif
)
{
if
(
$vlan
[
'if'
]
==
$realhwif
)
{
...
...
src/etc/inc/upgrade_config.inc
View file @
811cf082
...
@@ -42,12 +42,7 @@ function dump_rrd_to_xml($rrddatabase, $xmldumpfile)
...
@@ -42,12 +42,7 @@ function dump_rrd_to_xml($rrddatabase, $xmldumpfile)
return
(
$dumpret
);
return
(
$dumpret
);
}
}
/* This xml 2 array function is courtesy of the php.net comment section on xml_parse.
/* This xml 2 array function is courtesy of the php.net comment section on xml_parse. */
* it is roughly 4 times faster then our existing pfSense parser but due to the large
* size of the RRD xml dumps this is required.
* The reason we do not use it for pfSense is that it does not know about array fields
* which causes it to fail on array fields with single items. Possible Todo?
*/
function
xml2array
(
$contents
,
$get_attributes
=
1
,
$priority
=
'tag'
)
function
xml2array
(
$contents
,
$get_attributes
=
1
,
$priority
=
'tag'
)
{
{
if
(
!
function_exists
(
'xml_parser_create'
))
if
(
!
function_exists
(
'xml_parser_create'
))
...
...
src/etc/inc/vslb.inc
View file @
811cf082
...
@@ -92,11 +92,6 @@ function relayd_configure($kill_first = false)
...
@@ -92,11 +92,6 @@ function relayd_configure($kill_first = false)
$fd
=
fopen
(
'/var/etc/relayd.conf'
,
'w'
);
$fd
=
fopen
(
'/var/etc/relayd.conf'
,
'w'
);
$conf
=
"log updates
\n
"
;
$conf
=
"log updates
\n
"
;
/* Global timeout, interval and prefork settings
if not specified by the user:
- use a 1000 ms timeout value as in pfsense 2.0.1 and above
- leave interval and prefork empty, relayd will use its default values */
if
(
!
empty
(
$setting
[
'timeout'
]))
{
if
(
!
empty
(
$setting
[
'timeout'
]))
{
$conf
.=
"timeout "
.
$setting
[
'timeout'
]
.
"
\n
"
;
$conf
.=
"timeout "
.
$setting
[
'timeout'
]
.
"
\n
"
;
}
else
{
}
else
{
...
...
src/www/diag_backup.php
View file @
811cf082
...
@@ -115,7 +115,6 @@ function rrd_data_xml() {
...
@@ -115,7 +115,6 @@ function rrd_data_xml() {
return
$result
;
return
$result
;
}
}
function
restore_rrddata
()
{
function
restore_rrddata
()
{
global
$config
;
global
$config
;
foreach
(
$config
[
'rrddata'
][
'rrddatafile'
]
as
$rrd
)
{
foreach
(
$config
[
'rrddata'
][
'rrddatafile'
]
as
$rrd
)
{
...
@@ -135,7 +134,7 @@ function restore_rrddata() {
...
@@ -135,7 +134,7 @@ function restore_rrddata() {
}
}
unlink
(
$xml_file
);
unlink
(
$xml_file
);
}
elseif
(
!
empty
(
$rrd
[
'data'
]))
{
}
elseif
(
!
empty
(
$rrd
[
'data'
]))
{
/
/ pfSense 2.0 rrd backup format
/
* rrd backup format */
$rrd_file
=
"/var/db/rrd/
{
$rrd
[
'filename'
]
}
"
;
$rrd_file
=
"/var/db/rrd/
{
$rrd
[
'filename'
]
}
"
;
$rrd_fd
=
fopen
(
$rrd_file
,
"w"
);
$rrd_fd
=
fopen
(
$rrd_file
,
"w"
);
if
(
!
$rrd_fd
)
{
if
(
!
$rrd_fd
)
{
...
@@ -314,8 +313,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
...
@@ -314,8 +313,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
if
(
count
(
$input_errors
)
==
0
)
{
if
(
count
(
$input_errors
)
==
0
)
{
if
(
stristr
(
$data
,
"<m0n0wall>"
))
{
if
(
stristr
(
$data
,
"<m0n0wall>"
))
{
log_error
(
'Upgrading m0n0wall configuration to OPNsense.'
);
log_error
(
'Upgrading m0n0wall configuration to OPNsense.'
);
/* m0n0wall was found in config. convert it. */
$data
=
str_replace
(
'm0n0wall'
,
'opnsense'
,
$data
);
$data
=
str_replace
(
"m0n0wall"
,
"pfsense"
,
$data
);
$m0n0wall_upgrade
=
true
;
$m0n0wall_upgrade
=
true
;
}
}
if
(
!
empty
(
$_POST
[
'restorearea'
]))
{
if
(
!
empty
(
$_POST
[
'restorearea'
]))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment