Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
84
Issues
84
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
White Rabbit Switch - Software
Commits
6c14611b
Commit
6c14611b
authored
Nov 27, 2014
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build: configure snmpd at run-time, not build-time
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
7187ce93
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
9 deletions
+8
-9
wrs_build_wraprootfs
build/scripts/wrs_build_wraprootfs
+0
-8
apply_dot-config
userspace/rootfs_override/wr/bin/apply_dot-config
+8
-1
snmpd.conf.in
userspace/rootfs_override/wr/etc/snmpd.conf.in
+0
-0
No files found.
build/scripts/wrs_build_wraprootfs
View file @
6c14611b
...
...
@@ -47,14 +47,6 @@ rm -rf $TMPFS/dev
(cd
$TMPFS
&& tar xzf
$DEVTAR
)
(cd
$TMPFS
&& ln -fs sbin/init .)
# 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
if [ -z "\
$value
" ]; then continue; fi
sed -i "/\
$varname
/ s/^#//" \
$cfgfile
sed -i "/\
$varname
/ s/\
$varname
/\
$value
/" \
$cfgfile
done
# Fix log values
cfgfile="
$TMPFS
/wr/sbin/start-daemons.sh"
set | grep CONFIG_WRS_LOG | sed 's/=/ /' | while read varname value; do
...
...
userspace/rootfs_override/wr/bin/apply_dot-config
View file @
6c14611b
...
...
@@ -58,4 +58,11 @@ if [ ! -z "$CONFIG_REMOTE_SYSLOG_SERVER" ]; then
fi
copy_conf /etc/rsyslog.conf /usr/etc/rsyslog.conf
# Fix SNMP values: for all not-empty configs remove comment and replace value
cp
/wr/etc/snmpd.conf.in
$T
set
|
grep
CONFIG_SNMP |
sed
's/=/ /'
|
while
read
varname value
;
do
if
[
-z
"
$value
"
]
;
then continue
;
fi
sed
-i
"/
$varname
/ s/^#//"
$T
sed
-i
"/
$varname
/ s/
$varname
/
$value
/"
$T
done
copy_conf /wr/etc/snmpd.conf
userspace/rootfs_override/wr/etc/snmpd.conf
→
userspace/rootfs_override/wr/etc/snmpd.conf
.in
View file @
6c14611b
File moved
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