On 06/10/2010 10:31 AM, Jo-Philipp Wich wrote:
When is coldplug_interface_* actually being called?
On boot, by /etc/init.d/network.
If an interface is found with .auto != 0 and a protocol that implements 
coldplug_*, then it is called.
This is required for "virtual" interfaces like 6in4 tunnels that create their 
own (tuntap) ifaces and have no physical interface like eth0 associated.

I'm having a problem with setup_interface_*. Basically my setup_interface_* creates a new tun device. When this device is created an hotplug event is generated. This hotplug event is handle also by the net/10-net script which calls again the setup_interface_* method.

I cannot move the code that creates the device to the coldplug_* method because in this way if auto is set to false i cannot use the command "ifup mesh" to start the protocol. I could had a check in my setup_interface_* code to check if the interface is already available but this looks ugly to me: a method that is supposed to create the interface
should not be called again when the interface i created.

R.
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to