Changeset 44629


Ignore:
Timestamp:
2015-03-09T15:06:30+01:00 (3 years ago)
Author:
blogic
Message:

wwan: Improve USB modem hotplug script

Adds ncm proto to the list of checked protocols, sets interfaces
unavailable on device removal and removes the unnecessary ifup
command.

Signed-off-by: Matti Laakso <malaakso@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/network/utils/wwan/files/wwan.usbmisc

    r42837 r44629  
    11#!/bin/sh 
    22 
    3 [ "$ACTION" = add ] || exit 0 
     3[ "$ACTION" = add ] || [ "$ACTION" = remove ] || exit 0 
    44[ "${DEVNAME/[0-9]/}" = cdc-wdm ] || exit 0 
    55 
     
    1414        config_get device "$cfg" device 
    1515 
    16         [ "$proto" = wwan ] || [ "$proto" = mbim ] || [ "$proto" = qmi ] || return 0 
     16        [ "$proto" = wwan ] || [ "$proto" = mbim ] || [ "$proto" = qmi ] || [ "$proto" = ncm ] || return 0 
    1717        [ -z "$device" -a "$proto" = wwan ] || [ "$device" = "/dev/$DEVNAME" ] || return 0 
    18  
    19         proto_set_available "$cfg" 1 
    20         ifup "$cfg" 
     18        if [ "$ACTION" = add ]; then 
     19                proto_set_available "$cfg" 1 
     20        else 
     21                proto_set_available "$cfg" 0 
     22        fi 
    2123        exit 0 
    2224} 
Note: See TracChangeset for help on using the changeset viewer.