Lan status export

Greetings,

is there a status file that displays the status of the br-lan? I need to know if it is up and has ip
I cannot execute cmds so ip a and ifconfig won't help.

Thanks,

Dagg

Well check out /sys/class/net/br-lan/carrier or what you find in /proc/net/ if you don't find there something satisfying and you can't execute commands just have a cronjob that writes the status into a file :wink:

cat << "EOF" > /etc/hotplug.d/iface/10-custom
if [ "${ACTION}" = "ifup" -a "${INTERFACE}" = "lan" ]
then custom_cmd
fi
EOF

https://openwrt.org/docs/guide-user/base-system/hotplug

2 Likes

thanks, looks iike this might help me.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.