What happens if two or more hotplug events trigger essentially
simultaneously (can happen)? i.e. how do you prevent multiple processes
writing out of order (i.e. order is not guaranteed)?
Regards,
Daniel
On 13-06-28 09:55 AM, Enrico Mioso wrote:
This patch makes the network status file in /tmp/ consistent, so that
when an interface goes down, any script parsing the file can see it!
This can be a pretty good alternative to json when you need a VERY
small script.
Index:
package/network/config/netifd/files/etc/hotplug.d/iface/00-netstate
===================================================================
---
package/network/config/netifd/files/etc/hotplug.d/iface/00-netstate
(revision 37055)
+++
package/network/config/netifd/files/etc/hotplug.d/iface/00-netstate
(working copy)
@@ -6,3 +6,7 @@
uci_toggle_state network "$INTERFACE" ifname "$DEVICE"
}
}
+
+[ ifdown = "$ACTION" ] && {
+ uci_toggle_state network "$INTERFACE" up 0
+}
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
--
Daniel Dickinson PowerCloud Systems, Palo Alto, CA Senior Firmware
Engineer (In Canada: Senior Firmware Analyst)
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel