If your problem doesn't fall into one of the other categories, report it here.
Moderator: Moderators
agrohe21
Posts: 101 Joined: Wed Aug 23, 2017 7:51 pm
Post
by agrohe21 » Fri Feb 28, 2020 2:41 pm
I dont see a uci setting or a script for this.
I am currently getting this was. Is it correct? Is there another/better way?
Code: Select all
ip addr list eth1.2|grep inet|awk '{print $2}'|sed 's/\/22//'
Linksys WRT32x Wired Gateway, Orbi RBK20 Wifi
Linksys WRT32x Wired Gateway, Orbi RBK50 Wifi
agrohe21
Posts: 101 Joined: Wed Aug 23, 2017 7:51 pm
Post
by agrohe21 » Fri Feb 28, 2020 2:50 pm
I do see an entry in /var/state/network
that is probably better/safer, right?
network.wan.ipaddr
Linksys WRT32x Wired Gateway, Orbi RBK20 Wifi
Linksys WRT32x Wired Gateway, Orbi RBK50 Wifi
Lantis
Moderator
Posts: 7063 Joined: Mon Jan 05, 2015 5:33 am
Location: Australia
Post
by Lantis » Fri Feb 28, 2020 6:04 pm
Network state is ok.
Is this for use in a script? If so, I would import the network functions file and use it.
Code: Select all
source /lib/functions/network.sh
network_find_wan NET_IF
network_get_ipaddr NET_ADDR "${NET_IF}"
echo "${NET_ADDR}"
https://lantisproject.com/downloads/gargoylebuilds for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.
agrohe21
Posts: 101 Joined: Wed Aug 23, 2017 7:51 pm
Post
by agrohe21 » Fri Feb 28, 2020 7:36 pm
Yes, it is for a script. thx for the tip
Linksys WRT32x Wired Gateway, Orbi RBK20 Wifi
Linksys WRT32x Wired Gateway, Orbi RBK50 Wifi