usb_modem_special_status 778 B

12345678910111213141516
  1. #!/bin/sh
  2. #BK called from udev rule in /etc/udev/rules.d/52-usb_modem_puppy.rules
  3. #120109 usb_modeswitch 1.2.1: my optus 3g modem, not creating /dev/gsmmodem. call usb_modeswitch_status to do all the work.
  4. PARAM1=""
  5. [ $1 ] && PARAM1="$1"
  6. if [ "$PARAM1" = "3g" ];then #120109 3g: see 52-usb_modem_puppy.rules
  7. #just go to normal status script...
  8. echo "Mode switching was successful" > /var/log/usb_modeswitch_special_status #read by usb_modeswitch_status
  9. #do not use 'exec' as udev calls this script multiple times and it must complete. but,
  10. #usb_modeswitch_status has a lock region that prevents near-simultaneous multiple instances, but need
  11. #to also do a running-check here first...
  12. [ "`/bin/pidof usb_modeswitch_status`" = "" ] && /usr/sbin/usb_modeswitch_status &
  13. fi