Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
wr-switch-sw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
white-rabbit
wr-switch-sw
Commits
7187ce93
Commit
7187ce93
authored
Nov 27, 2014
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build: configure rsyslog at run-time, not build-time
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
6d4631ff
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
8 deletions
+10
-8
wrs_build_wraprootfs
build/scripts/wrs_build_wraprootfs
+0
-8
rsyslog.conf.in
userspace/rootfs_override/etc/rsyslog.conf.in
+0
-0
apply_dot-config
userspace/rootfs_override/wr/bin/apply_dot-config
+10
-0
No files found.
build/scripts/wrs_build_wraprootfs
View file @
7187ce93
...
...
@@ -47,14 +47,6 @@ rm -rf $TMPFS/dev
(cd
$TMPFS
&& tar xzf
$DEVTAR
)
(cd
$TMPFS
&& ln -fs sbin/init .)
if [ "
$CONFIG_REMOTE_SYSLOG_UDP
" = "y" ]; then
sed -i 's/@@remote-host/@remote-host/'
$TMPFS
/etc/rsyslog.conf
fi
if [ ! -z "
$CONFIG_REMOTE_SYSLOG_SERVER
" ]; then
sed -i '/remote-host/ s/^##//'
$TMPFS
/etc/rsyslog.conf
sed -i 's/remote-host/
$CONFIG_REMOTE_SYSLOG_SERVER
/'
$TMPFS
/etc/rsyslog.conf
fi
# Fix SNMP values: for all not-empty configs remove commend and replace value
cfgfile="
$TMPFS
/wr/etc/snmpd.conf"
set | grep CONFIG_SNMP | sed 's/=/ /' | while read varname value; do
...
...
userspace/rootfs_override/etc/rsyslog.conf
→
userspace/rootfs_override/etc/rsyslog.conf
.in
View file @
7187ce93
File moved
userspace/rootfs_override/wr/bin/apply_dot-config
View file @
7187ce93
...
...
@@ -47,5 +47,15 @@ if [ ! -z "$CONFIG_DNS_SERVER" ]; then
fi
copy_conf /etc/resolv.conf /usr/etc/resolv.conf
# rsyslog.conf is created from a template file, and busybox sed has -i
cp
/usr/etc/rsyslog.conf.in
$T
if
[
"
$CONFIG_REMOTE_SYSLOG_UDP
"
=
"y"
]
;
then
sed
-i
's/@@remote-host/@remote-host/'
$T
fi
if
[
!
-z
"
$CONFIG_REMOTE_SYSLOG_SERVER
"
]
;
then
sed
-i
'/remote-host/ s/^##//'
$T
sed
-i
"s/remote-host/
$CONFIG_REMOTE_SYSLOG_SERVER
/"
$T
fi
copy_conf /etc/rsyslog.conf /usr/etc/rsyslog.conf
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