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
50248132
Commit
50248132
authored
Sep 22, 2016
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
system: fixes in previous
parent
29dcbf58
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
11 deletions
+13
-11
system.inc
src/etc/inc/system.inc
+13
-11
No files found.
src/etc/inc/system.inc
View file @
50248132
...
@@ -1954,24 +1954,26 @@ function system_console_configure()
...
@@ -1954,24 +1954,26 @@ function system_console_configure()
}
}
}
}
$new_loader_conf
=
""
;
$new_loader_conf
=
''
;
// construct OPNsense config for /boot/loader.conf
foreach
(
$new_boot_config
as
$param
=>
$value
)
{
/* reload static values from rc.loader.d */
if
(
!
empty
(
$value
))
{
mwexecf
(
'/usr/local/etc/rc.loader'
);
$new_loader_conf
.=
"
{
$param
}
=
{
$value
}
\n
"
;
}
/* copy non-matched settings already there */
}
// copy non matched settings in /boot/loader.conf
foreach
(
explode
(
"
\n
"
,
@
file_get_contents
(
'/boot/loader.conf'
))
as
$line
)
{
foreach
(
explode
(
"
\n
"
,
@
file_get_contents
(
'/boot/loader.conf'
))
as
$line
)
{
if
(
!
empty
(
$line
)
&&
!
array_key_exists
(
trim
(
explode
(
'='
,
$line
)[
0
]),
$new_boot_config
))
{
if
(
!
empty
(
$line
)
&&
!
array_key_exists
(
trim
(
explode
(
'='
,
$line
)[
0
]),
$new_boot_config
))
{
$new_loader_conf
.=
$line
.
"
\n
"
;
$new_loader_conf
.=
$line
.
"
\n
"
;
}
}
}
}
/* reload static values from rc.loader.d */
/* add our console options on top now */
mwexecf
(
'/usr/local/etc/rc.loader'
);
foreach
(
$new_boot_config
as
$param
=>
$value
)
{
if
(
!
empty
(
$value
))
{
$new_loader_conf
.=
"
{
$param
}
=
{
$value
}
\n
"
;
}
}
/*
inject dynamic values directly into loader.conf
*/
/*
write merged file back to target location
*/
@
file_put_contents
(
'/boot/loader.conf'
,
$new_loader_conf
);
@
file_put_contents
(
'/boot/loader.conf'
,
$new_loader_conf
);
// ** setup /etc/ttys
// ** setup /etc/ttys
...
...
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