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
d4fe7fbc
Commit
d4fe7fbc
authored
Nov 28, 2016
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rc: more $verbose conversion
parent
61626494
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
15 deletions
+40
-15
config.lib.inc
src/etc/inc/config.lib.inc
+10
-1
system.inc
src/etc/inc/system.inc
+27
-1
rc.bootup
src/etc/rc.bootup
+3
-13
No files found.
src/etc/inc/config.lib.inc
View file @
d4fe7fbc
...
...
@@ -92,8 +92,13 @@ function load_config_from_file($filename)
* RESULT
* $config - array containing all configuration variables
******/
function
parse_config
()
function
parse_config
(
$verbose
=
false
)
{
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)
...
...
@@ -102,6 +107,10 @@ function parse_config()
/* make alias table (for faster lookups) */
alias_make_table
(
$config
);
if
(
$verbose
)
{
echo
"done.
\n
"
;
}
return
$config
;
}
...
...
src/etc/inc/system.inc
View file @
d4fe7fbc
...
...
@@ -1473,6 +1473,22 @@ function system_kernel_configure($verbose = false)
}
}
function
system_devd_configure
(
$verbose
=
false
)
{
if
(
$verbose
)
{
echo
'Starting device manager...'
;
flush
();
}
exec
(
'/sbin/devd'
);
/* historic sleep */
sleep
(
1
);
if
(
$verbose
)
{
echo
"done.
\n
"
;
}
}
function
system_cron_configure
(
$verbose
=
false
)
{
global
$config
;
...
...
@@ -1610,10 +1626,15 @@ function system_console_types()
);
}
function
system_login_configure
()
function
system_login_configure
(
$verbose
=
false
)
{
global
$config
;
if
(
$verbose
)
{
echo
'Configuring login behaviour...'
;
flush
();
}
configd_run
(
'template reload OPNsense/Auth'
);
$serialspeed
=
(
!
empty
(
$config
[
'system'
][
'serialspeed'
])
&&
is_numeric
(
$config
[
'system'
][
'serialspeed'
]))
?
$config
[
'system'
][
'serialspeed'
]
:
'115200'
;
...
...
@@ -1718,6 +1739,11 @@ function system_login_configure()
}
fclose
(
$fd
);
if
(
$verbose
)
{
echo
"done
\n
"
;
flush
();
}
/* force init(8) to reload /etc/ttys */
exec
(
'/bin/kill -HUP 1'
);
}
...
...
src/etc/rc.bootup
View file @
d4fe7fbc
...
...
@@ -56,16 +56,8 @@ echo ".";
require_once
(
"rrd.inc"
);
echo
" done.
\n
"
;
/* start devd (dhclient now uses it) */
echo
"Starting device manager (devd)..."
;
system_console_mute
();
exec
(
'/sbin/devd'
);
sleep
(
1
);
system_console_unmute
();
echo
"done.
\n
"
;
/* configure login behaviour */
system_login_configure
();
system_devd_configure
(
true
);
system_login_configure
(
true
);
$setup_installer
=
is_install_media
();
if
(
$setup_installer
)
{
...
...
@@ -88,11 +80,9 @@ if ($setup_installer) {
OPNsense\Core\Config
::
getInstance
()
->
forceReload
();
}
echo
"Loading configuration..."
;
global
$config
;
$config
=
parse_config
();
$config
=
parse_config
(
true
);
convert_config
();
echo
"done.
\n
"
;
/*
* Determine if we need to throw a interface exception
...
...
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