#!/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