hotplug: 'bind' actions breaks 3g proto
Username: Alexander
Origin: https://bugs.openwrt.org/index.php?do=details&task_id=1941
Linux 4.12 added the actions “bind” and “unbind” for notification of devices being bound to, or released from, a driver. After ‘add’ action hotplug sends
invoke: {"objid":-701183341,"method":"notify_proto","data":{"action":5,"available":true,"interface":"lte"}}
But then ‘bind’ action apperas, and hotplug sends
invoke: {"objid":-701183341,"method":"notify_proto","data":{"action":5,"available":false,"interface":"lte"}}
because script marks interface as available only on add action (package/network/utils/comgt/files/3g.usb)
if [ "${dev##/}" = "${tty##/}" ]; then if [ "$ACTION" = add ]; then available=1 else available=0 fi proto_set_available "$cfg" $available fi
Dirty hack is
if [ "ACTION" = add -o "
ACTION" = bind ]; then