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
e14d5e28
Commit
e14d5e28
authored
Feb 23, 2016
by
Ad Schellevis
Committed by
Franco Fichtner
Mar 03, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(legacy) move logfile generation to system_syslogd_start()
(cherry picked from commit
53747001
)
parent
f8435a9f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
15 deletions
+11
-15
system.inc
src/etc/inc/system.inc
+11
-0
rc
src/etc/rc
+0
-15
No files found.
src/etc/inc/system.inc
View file @
e14d5e28
...
...
@@ -934,6 +934,17 @@ EOD;
}
$syslogd_extra
=
"-f /var/etc/syslog.conf
{
$sourceip
}
"
;
// setup log files for all facilities including default
$default_logfile_size
=
!
empty
(
$syslogcfg
[
'logfilesize'
])
?
$syslogcfg
[
'logfilesize'
]
:
'511488'
;
$syslog_files
=
array_keys
(
$syslogconfs
);
$syslog_files
=
array_merge
(
$syslog_files
,
array
(
'system'
,
'vpn'
,
'lighttpd'
));
foreach
(
$syslog_files
as
$syslog_fn
)
{
$filename
=
"/var/log/"
.
basename
(
$syslog_fn
)
.
".log"
;
if
(
!
file_exists
(
$filename
))
{
mwexecf
(
'/usr/local/sbin/clog -i -s %s %s'
,
array
(
$default_logfile_size
,
$filename
));
}
mwexecf
(
'chmod 0600 %s'
,
array
(
$filename
));
}
}
if
(
isvalidpid
(
'/var/run/syslog.pid'
))
{
...
...
src/etc/rc
View file @
e14d5e28
...
...
@@ -164,21 +164,6 @@ rm -f /var/run/nologin
rm
-rf
/tmp/
*
chmod
1777 /tmp
echo
-n
"."
LOG_FILES
=
"system filter dhcpd vpn pptps poes l2tps openvpn portalauth ipsec ppps relayd wireless lighttpd ntpd gateways resolver routing"
DEFAULT_LOG_FILE_SIZE
=
`
/usr/local/bin/xmllint
--xpath
'string(//opnsense/syslog/logfilesize)'
/conf/config.xml
`
if
[
!
${
DEFAULT_LOG_FILE_SIZE
}
]
;
then
DEFAULT_LOG_FILE_SIZE
=
511488
fi
for
logfile
in
$LOG_FILES
;
do
if
[
!
-f
/var/log/
$logfile
.log
]
;
then
clog
-i
-s
${
DEFAULT_LOG_FILE_SIZE
}
/var/log/
$logfile
.log
fi
chmod
0600 /var/log/
$logfile
.log
done
echo
-n
"."
/sbin/ldconfig
-elf
/usr/lib /usr/local/lib /lib
/etc/rc.d/ldconfig start 2>/dev/null
...
...
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