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
b306aaae
Commit
b306aaae
authored
May 11, 2017
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
config: migration could be stripped, global vars are always global
parent
983b11f3
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
8 additions
and
25 deletions
+8
-25
config.inc
src/etc/inc/config.inc
+5
-10
rc.bootup
src/etc/rc.bootup
+1
-3
rc.initial.setports
src/etc/rc.initial.setports
+0
-3
rc.reload_all
src/etc/rc.reload_all
+0
-4
generate_certs.php
...pnsense/scripts/OPNsense/CaptivePortal/generate_certs.php
+1
-2
generate_cert.php
src/opnsense/scripts/proxy/generate_cert.php
+1
-2
system_usermanager_import_ldap.php
src/www/system_usermanager_import_ldap.php
+0
-1
No files found.
src/etc/inc/config.inc
View file @
b306aaae
...
...
@@ -80,13 +80,8 @@ function load_config_from_file($filename)
* RESULT
* $config - array containing all configuration variables
******/
function
parse_config
(
$verbose
=
false
)
function
parse_config
()
{
if
(
$verbose
)
{
echo
'Loading configuration...'
;
flush
();
}
$cnf
=
OPNsense\Core\Config
::
getInstance
();
// return config data as array, use old "listags" construction to mark certain elements as array (even if they're not recurring)
...
...
@@ -95,10 +90,6 @@ function parse_config($verbose = false)
/* make alias table (for faster lookups) */
alias_make_table
(
$config
);
if
(
$verbose
)
{
echo
"done.
\n
"
;
}
return
$config
;
}
...
...
@@ -151,6 +142,10 @@ function convert_config($verbose = false)
}
else
{
mwexecf
(
$mvc_migration
);
}
/* reload the config as it was rewritten and saved in the script context */
OPNsense\Core\Config
::
getInstance
()
->
forceReload
();
$config
=
parse_config
();
}
/****f* config/write_config
...
...
src/etc/rc.bootup
View file @
b306aaae
...
...
@@ -56,9 +56,7 @@ foreach ($inc_files as $inc_file) {
echo
"done.
\n
"
;
global
$config
;
$config
=
parse_config
(
true
);
convert_config
();
convert_config
(
true
);
/*
* Now mute console messages from kernel for this script, it
...
...
src/etc/rc.initial.setports
View file @
b306aaae
...
...
@@ -39,9 +39,6 @@ require_once("interfaces.inc");
system_console_mute
();
if
(
set_networking_interfaces_ports
())
{
global
$config
;
$config
=
parse_config
(
true
);
/* need to stop local dhcp servers to avoid wrong leases */
killbypid
(
'/var/dhcpd/var/run/dhcpd.pid'
,
'TERM'
,
true
);
killbypid
(
'/var/dhcpd/var/run/dhcpdv6.pid'
,
'TERM'
,
true
);
...
...
src/etc/rc.reload_all
View file @
b306aaae
...
...
@@ -37,10 +37,6 @@ require_once("system.inc");
require_once
(
"services.inc"
);
require_once
(
"interfaces.inc"
);
global
$config
;
$config
=
parse_config
(
true
);
if
(
count
(
$argv
)
>
1
&&
is_numeric
(
$argv
[
1
]))
{
// starting delayed.
sleep
(
$argv
[
1
]);
...
...
src/opnsense/scripts/OPNsense/CaptivePortal/generate_certs.php
View file @
b306aaae
...
...
@@ -34,9 +34,8 @@
require_once
(
"config.inc"
);
require_once
(
"certs.inc"
);
require_once
(
"legacy_bindings.inc"
);
use
OPNsense\Core\Config
;
global
$c
onfig
;
use
OPNsense\Core\C
onfig
;
// traverse captive portal zones
$configObj
=
Config
::
getInstance
()
->
object
();
...
...
src/opnsense/scripts/proxy/generate_cert.php
View file @
b306aaae
...
...
@@ -33,9 +33,8 @@
require_once
(
"config.inc"
);
require_once
(
"certs.inc"
);
require_once
(
"legacy_bindings.inc"
);
use
OPNsense\Core\Config
;
global
$c
onfig
;
use
OPNsense\Core\C
onfig
;
// Our template systems stores the ca certid into /usr/local/etc/squid/ca.pem.id
// Which makes it easier for the setup script to detect cert changes (which should flush the stored cache)
...
...
src/www/system_usermanager_import_ldap.php
View file @
b306aaae
...
...
@@ -58,7 +58,6 @@ function add_local_user($username, $userdn, $userfullname)
local_user_set
(
$new_user
);
}
global
$config
;
// attributes used in page
$ldap_users
=
array
();
$ldap_is_connected
=
false
;
...
...
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