[luci] Restarting specific network interface in WRL7

Anmol Porwal anmol at riptideio.com
Tue Jul 12 19:12:36 CEST 2016


Hi,

I am beginner to Luci, but I have used uci commands with WRL5 for various
configurations.

I am using WRL7, and want to configure network interfaces with the ability
to be persistent across reboots. I tried uci commands which work perfectly:


   - $ uci set network.wan=interface
   - $ uci set network.wan.proto=static
   - $ uci set network.wan.ifname=eth0
   - $ uci set network.wan.ipaddr={ipaddr}
   - $ uci set network.wan.netmask={netmask}
   - $ uci set network.wan.broadcast={broadcast}
   - $ uci set network.wan.gateway={gateway}
   - $ uci commit network

After commiting changes I need to restart the network for which I used
"/etc/init.d/network restart" which complains "no such file
/etc/init.d/network" (which should be there but missing in WRL7).

I checked Luci code for updating network interface there also uci commands
are used (network configuration
<https://github.com/openwrt/luci/blob/5b79e62c0a99bab8dfb8dce8124d9fecc11da54b/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_wan_static.sh>),
but in the end 'meshwizard' is being used which I didn't find anywhere on
my machine.

Can anyone suggest how to proceed to update network interfaces using uci
commands similar to Luci?

Thank you,
Anmol Porwal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsignal.org/pipermail/luci/attachments/20160712/faf3c087/attachment.html>


More information about the luci mailing list