You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
456 B
Bash

#!/bin/sh
#
# Copyright (C) 2015 devolo AG
#
. /lib/functions.sh
# update SNMP system information from config/system
config_cb() {
[ "$1" != system ] && { option_cb() { return ; } ; return; }
option_cb() {
case $1 in
hostname)
uci_set snmpd @system[0] sysName "$2"
;;
location)
uci_set snmpd @system[0] sysLocation "$2"
;;
contact)
uci_set snmpd @system[0] sysContact "$2"
;;
esac
}
}
config_load system
uci_commit snmpd