Commit de79d73e authored by Adam Wujek's avatar Adam Wujek 💬

rootfs: use /etc/snmpd.conf not /wr/etc/snmpd.conf

Keep modified snmpd.conf in /etc not in /wr/etc.
There is no need to keep it in the flash instead of ramdisk.
Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent 02bb6153
#!/bin/sh
SNMP_PID=/var/run/snmpd.pid
SNMP_CONF=/wr/etc/snmpd.conf
SNMP_CONF=/etc/snmpd.conf
dotconfig=/wr/etc/dot-config
start_counter() {
......
......@@ -2,6 +2,7 @@
//Global Variables
$etcdir="/usr/wr/etc/"; //configuration file folder for WRS
$etcdir_ram="/etc/"; //configuration file folder for WRS in ramdisk
$snmpconf="snmpd.conf";
$ppsipreconf="ppsi-pre.conf";
$sfpdatabaseconf="sfp_database.conf";
......@@ -161,7 +162,7 @@ function wrs_main_info(){
$SNMP = check_snmp_status() ? '[on] ' : '[off] ';
$SNMP_version = '&nbsp;&nbsp;ver. '.
shell_exec("snmpd -v | grep version | awk '{print $3}'");
$SNMP_port = shell_exec("cat ".$GLOBALS['etcdir']."snmpd.conf |
$SNMP_port = shell_exec("cat ".$GLOBALS['etcdir_ram'].$GLOBALS['snmpconf']." |
grep agent | cut -d: -f3 | awk '{print $1}'");
$NTP = $_SESSION['KCONFIG']["CONFIG_NTP_SERVER"];
$Monitor = check_monit_status() ? '[on] ' : '[off] ';
......
......@@ -102,7 +102,7 @@ set | tr -d \' | grep CONFIG_SNMP | sed 's/=/ /' | while read varname value; do
sed -i "/$varname/ s/^#//" $T
sed -i "/$varname/ s/$varname/$value/" $T
done
copy_conf /wr/etc/snmpd.conf
cp $T /etc/snmpd.conf
# Select a ppsi configuration file
if [ "$CONFIG_PTP_PORT_PARAMS" = "y" ]; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment