OK Thannks. However I dint want to do that (/etc/init.d/network restart) ; Instead need to do only when my config section changes. How can I do the same?
Ok. In that case how the existing procd watch of network works? When I change anything in the network section it does auto restart after a while
Also, This config would be changed by several interfaces like SNMP/GUI/TR069 and dont want to do NW restart triggered after config change instead applied alog with other changes after procd NW restart.
Changes to /etc/config/network trigger the config reload mechanism which sends a reload signal to netifd to recalculate the desired configuration state. This state is then compared to the effective runtime configuration state and only the settings which differ are applied by using various syscalls and netlink apis.
This mechanism will not work for options netifd does not know about. I assume the config vlanport section is a configuration extension specific to your local OpenWrt modification. The best course of action would be to write a custom service (which can consist of a sole init script triggering a command) which subscribes to /etc/config/network changes by using procd_add_reload_trigger network.
This will then issue an /etc/init.d/yourscript reload whenever the contents of /etc/config/network changed since the last run of your script. It is then up to your script (or the program it invokes) to compare the new value with the one being effective momentarily and decide whether actions have to be taken to make it effective or not.
The procd_set_param watch statement does not refer to configuration items in uci files, but to ubus objects being supervised for changes.