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
https://github.com/systemd/systemd/issues/8221
Signed-off-by: Arjun AK <arjunak234@gmail.com>
(cherry picked from commit
89ef883b92b3a87d9ab1bd289de26b9e72681dac)
fi
}
+[ "$ACTION" = add ] || [ "$ACTION" = remove ] || exit 0
+
case "$DEVICENAME" in
tty*)
[ -e "/dev/$DEVICENAME" ] || [ "$ACTION" = remove ] || exit 0