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
86
Issues
86
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
28b0dbe1
Commit
28b0dbe1
authored
Apr 01, 2014
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build: fix snmpd.conf according to Kconfig values
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
66ebef62
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
4 deletions
+53
-4
Kconfig
Kconfig
+38
-0
wrs_build_wraprootfs
build/scripts/wrs_build_wraprootfs
+9
-0
snmpd.conf
userspace/rootfs_override/wr/etc/snmpd.conf
+6
-4
No files found.
Kconfig
View file @
28b0dbe1
...
...
@@ -71,6 +71,44 @@ config REMOTE_SYSLOG_UDP
help
Select UDP to send system logs. If not set, TCP is used.
config SNMP_TRAPSINK_ADDRESS
string "Static IP address or name where to send SNMPv1 traps"
help
If not empty, the address or name is ussed as "trapsink"
destination in the SNMP configuration file for the switch.
It empty, no v1 traps are generated. If both this and
the following TRAP2SINK_ADDRESS are set, snmpd sends two
traps (one per protocol version). Trapcommunity is "public"
(not configurable so far).
config SNMP_TRAP2SINK_ADDRESS
string "Static IP address or name where to send SNMPv2c traps"
help
If not empty, the address or name is ussed as "trap2sink"
destination in the SNMP configuration file for the switch.
It empty, no v2c traps are generated. Trapcommunity is "public"
(not configurable so far).
config SNMP_RO_COMMUNITY
string "Read-only community name for SNMP V1/V2 management"
default "public"
help
If not empty, the 'community' name is a sort of password,
that travels as clear text (we don't support encrypted SNMPv3
yet). The default is good for testing, but should be changed
for production. Please note, however, that the switch processes
SNMP only on the CPU Ethernet port (the copper "management" port).
config SNMP_RW_COMMUNITY
string "Read-write community name for SNMP V1/V2 management"
default "private"
help
If not empty, the 'community' name is a sort of password,
that travels as clear text (we don't support encrypted SNMPv3
yet). The default is good for testing, but should be changed
for production. Please note, however, that the switch processes
SNMP only on the CPU Ethernet port (the copper "management" port).
config KEEP_ROOTFS
bool "Keep generated filesystem and related script"
help
...
...
build/scripts/wrs_build_wraprootfs
View file @
28b0dbe1
...
...
@@ -29,6 +29,7 @@ TMPSCRIPT=$(mktemp /tmp/rootfs-script.XXXXXX)
ROOTFS_IMAGE_TGZ
=
"
$WRS_OUTPUT_DIR
/images/wrs-image.tar.gz"
cat
>
$TMPSCRIPT
<<
EOF
.
$WRS_BASE_DIR
/../.config
mkdir -p
$TMPFS
/wr
cp -r
$rootfs_vanilla
/*
$TMPFS
...
...
@@ -61,6 +62,14 @@ if [ ! -z "$CONFIG_REMOTE_SYSLOG_SERVER" ]; then
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
if [ -z "\
$value
" ]; then continue; fi
sed -i "/\
$varname
/ s/^#//" \
$cfgfile
sed -i "/\
$varname
/ s/\
$varname
/\
$value
/" \
$cfgfile
done
mkdir -p
$TMPFS
/root/.ssh
#cat
$HOME
/.ssh/id_?sa.pub >>
$TMPFS
/root/.ssh/authorized_keys
if [ -f
$WRS_BASE_DIR
/authorized_keys ]; then
...
...
userspace/rootfs_override/wr/etc/snmpd.conf
View file @
28b0dbe1
# snmpd.conf
#
# - created by the snmpconf configuration program
# - manually edited to simplify it
# - manually edited to simplify it a lot
# - edited using Kconfig values at switch build time
#
agentAddress
udp
::
161
#trapsink CONFIG_TRAPSINK_ADDRESS
#trapsink CONFIG_SNMP_TRAPSINK_ADDRESS
#trap2sink CONFIG_SNMP_TRAP2SINK_ADDRESS
trapcommunity
public
authtrapenable
1
rocommunity
public
rwcommunity
private
#rocommunity CONFIG_SNMP_RO_COMMUNITY
#rwcommunity CONFIG_SNMP_RW_COMMUNITY
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