Skip to content

Commit

Permalink
package/comgt: Handle bind/unbind events
Browse files Browse the repository at this point in the history
This script was expecting only add/remove events which has not been the
case since Kernel 4.12 (which added bind/unbind). Bind events were getting
treated as remove events which would cause hotplugged 3g modems to not
work.

More info:
https://lkml.org/lkml/2018/12/23/128
systemd/systemd#8221

Signed-off-by: Arjun AK <arjunak234@gmail.com>
  • Loading branch information
arjunak234 authored and ynezz committed Jul 2, 2021
1 parent 0494278 commit 89ef883
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions package/network/utils/comgt/files/3g.usb
Expand Up @@ -23,6 +23,8 @@ find_3g_iface() {
fi
}

[ "$ACTION" = add ] || [ "$ACTION" = remove ] || exit 0

case "$DEVICENAME" in
tty*)
[ -e "/dev/$DEVICENAME" ] || [ "$ACTION" = remove ] || exit 0
Expand Down

0 comments on commit 89ef883

Please sign in to comment.