this variable in /etc/config/system ends up overwriting /proc/sys/kernel/hostname on startup
running grep '/proc/sys/kernel/' /etc/init.d/system
returns: echo "$hostname" > /proc/sys/kernel/hostname
But, grep -r '/proc/sys/kernel/domainname' /etc
doesn't return any matches (in /etc)
Why should OpenWrt set a domainname? Do you have a domain assigned to your router/ip? What you try to achive? DDNS is not relying on internal hostname or domainname.
If you want to do sth. like redirect or overwrite a dns name you can do it as followed: