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
a9b8f965
Commit
a9b8f965
authored
Nov 13, 2016
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
verbose option for #1256
parent
4c253df1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
9 deletions
+11
-9
system.inc
src/etc/inc/system.inc
+9
-7
rc.bootup
src/etc/rc.bootup
+2
-2
No files found.
src/etc/inc/system.inc
View file @
a9b8f965
...
@@ -184,7 +184,7 @@ function system_resolvconf_generate($dynupdate = false)
...
@@ -184,7 +184,7 @@ function system_resolvconf_generate($dynupdate = false)
$fd
=
fopen
(
'/etc/resolv.conf'
,
'w'
);
$fd
=
fopen
(
'/etc/resolv.conf'
,
'w'
);
if
(
!
$fd
)
{
if
(
!
$fd
)
{
printf
(
"Error: cannot open resolv.conf in system_resolvconf_generate().
\n
"
);
log_error
(
'Cannot open resolv.conf in system_resolvconf_generate()'
);
unlock
(
$dnslock
);
unlock
(
$dnslock
);
return
1
;
return
1
;
}
}
...
@@ -765,7 +765,7 @@ function system_syslogd_extra_local($logsocket)
...
@@ -765,7 +765,7 @@ function system_syslogd_extra_local($logsocket)
return
exec_safe
(
'-l %s '
,
$logsocket
);
return
exec_safe
(
'-l %s '
,
$logsocket
);
}
}
function
system_syslogd_start
()
function
system_syslogd_start
(
$verbose
=
false
)
{
{
global
$config
,
$g
;
global
$config
,
$g
;
...
@@ -775,8 +775,10 @@ function system_syslogd_start()
...
@@ -775,8 +775,10 @@ function system_syslogd_start()
mwexec
(
'/etc/rc.d/hostid start'
);
mwexec
(
'/etc/rc.d/hostid start'
);
$syslogcfg
=
$config
[
'syslog'
];
$syslogcfg
=
$config
[
'syslog'
];
if
(
file_exists
(
'/var/run/booting'
))
{
echo
gettext
(
'Starting syslog...'
);
if
(
$verbose
)
{
echo
'Starting syslog...'
;
flush
();
}
}
$log_directive
=
'%'
;
$log_directive
=
'%'
;
...
@@ -866,7 +868,7 @@ EOD;
...
@@ -866,7 +868,7 @@ EOD;
/* write syslog.conf */
/* write syslog.conf */
if
(
!@
file_put_contents
(
"/var/etc/syslog.conf"
,
$syslogconf
))
{
if
(
!@
file_put_contents
(
"/var/etc/syslog.conf"
,
$syslogconf
))
{
printf
(
gettext
(
"Error: cannot open syslog.conf in system_syslogd_start().%s"
),
"
\n
"
);
log_error
(
'Cannot open syslog.conf in system_syslogd_start()'
);
unset
(
$syslogconf
);
unset
(
$syslogconf
);
return
1
;
return
1
;
}
}
...
@@ -910,8 +912,8 @@ EOD;
...
@@ -910,8 +912,8 @@ EOD;
mwexecf_bg
(
"/usr/local/sbin/syslogd -s -c -c -P %s
{
$syslogd_extra
}
"
,
'/var/run/syslog.pid'
);
mwexecf_bg
(
"/usr/local/sbin/syslogd -s -c -c -P %s
{
$syslogd_extra
}
"
,
'/var/run/syslog.pid'
);
}
}
if
(
file_exists
(
"/var/run/booting"
)
)
{
if
(
$verbose
)
{
echo
gettext
(
"done."
)
.
"
\n
"
;
echo
"done.
\n
"
;
}
}
}
}
...
...
src/etc/rc.bootup
View file @
a9b8f965
...
@@ -134,7 +134,7 @@ system_hosts_generate();
...
@@ -134,7 +134,7 @@ system_hosts_generate();
interfaces_loopback_configure
();
interfaces_loopback_configure
();
/* start syslogd */
/* start syslogd */
system_syslogd_start
();
system_syslogd_start
(
true
);
/* set up interfaces */
/* set up interfaces */
mute_kernel_msgs
();
mute_kernel_msgs
();
...
@@ -253,7 +253,7 @@ prefer_ipv4_or_ipv6();
...
@@ -253,7 +253,7 @@ prefer_ipv4_or_ipv6();
* initialized, otherwise it can occasionally fail to
* initialized, otherwise it can occasionally fail to
* route syslog messages properly on both IPv4 and IPv6.
* route syslog messages properly on both IPv4 and IPv6.
*/
*/
system_syslogd_start
();
system_syslogd_start
(
true
);
/* If there are ipsec dynamic hosts try again to reload the tunnels as rc.newipsecdns does */
/* If there are ipsec dynamic hosts try again to reload the tunnels as rc.newipsecdns does */
if
(
$ipsec_dynamic_hosts
)
{
if
(
$ipsec_dynamic_hosts
)
{
...
...
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