[sisyphus] Какое правило udev создать, чтобы не давать команду вручную ?

Ruslan Hihin ruslandh на gmail.com
Пт Ноя 29 13:08:41 MSK 2019


Здравствуйте :-)

Вставил модем:

-------------------
лог 

udevadm monitor


KERNEL[1297.940790] add      /devices/pci0000:00/0000:00:12.2/usb1/1-3
(usb) KERNEL[1297.950881] add
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.0 (usb)
KERNEL[1297.951468] add
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.0/host12 (scsi)
KERNEL[1297.951525] add
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.0/host12/scsi_host/host12
(scsi_host) KERNEL[1297.951600] bind
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.0 (usb)
KERNEL[1297.951701] bind     /devices/pci0000:00/0000:00:12.2/usb1/1-3
(usb) UDEV  [1297.972628] add
/devices/pci0000:00/0000:00:12.2/usb1/1-3 (usb) UDEV  [1297.989285] add
     /devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.0 (usb) UDEV
[1297.990382] add
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.0/host12 (scsi) UDEV
[1297.991352] add
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.0/host12/scsi_host/host12
(scsi_host) UDEV  [1297.992418] bind
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.0 (usb) UDEV
[1298.017560] bind     /devices/pci0000:00/0000:00:12.2/usb1/1-3 (usb)
KERNEL[1298.554487] remove
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.0/host12/scsi_host/host12
(scsi_host) KERNEL[1298.554533] remove
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.0/host12 (scsi) UDEV
[1298.556156] remove
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.0/host12/scsi_host/host12
(scsi_host) UDEV  [1298.557146] remove
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.0/host12 (scsi)
KERNEL[1298.559936] unbind
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.0 (usb) UDEV
[1298.561419] unbind
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.0 (usb)

#---------------------

модем не виден

Даю команду:

#/usr/sbin/usb_modeswitch -J -v 12d1 -p 155b -V 12d1 -P 1506

=====================
пошел новый лог:

KERNEL[1364.460906] bind
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.0 (usb) UDEV
[1364.464919] bind
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.0 (usb)
KERNEL[1364.488073] unbind
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.0 (usb)
KERNEL[1364.488142] remove
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.0 (usb)
KERNEL[1364.488654] unbind   /devices/pci0000:00/0000:00:12.2/usb1/1-3
(usb) KERNEL[1364.488712] remove
/devices/pci0000:00/0000:00:12.2/usb1/1-3 (usb) UDEV  [1364.488934]
unbind   /devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.0 (usb) UDEV
[1364.489897] remove
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.0 (usb) UDEV
[1364.490974] unbind   /devices/pci0000:00/0000:00:12.2/usb1/1-3 (usb)
UDEV  [1364.498849] remove   /devices/pci0000:00/0000:00:12.2/usb1/1-3
(usb) KERNEL[1364.958063] add
/devices/pci0000:00/0000:00:12.2/usb1/1-3 (usb) KERNEL[1364.964097] add
     /devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.0 (usb)
KERNEL[1364.964400] add
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.1 (usb)
KERNEL[1364.964455] add
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.2 (usb)
KERNEL[1364.964495] add
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.3 (usb)
KERNEL[1364.965689] add
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.3/host12 (scsi)
KERNEL[1364.965734] add
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.3/host12/scsi_host/host12
(scsi_host) KERNEL[1364.965783] bind
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.3 (usb)
KERNEL[1364.965837] bind     /devices/pci0000:00/0000:00:12.2/usb1/1-3
(usb) UDEV  [1365.002377] add
/devices/pci0000:00/0000:00:12.2/usb1/1-3 (usb) UDEV  [1365.017985] add
     /devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.3 (usb) UDEV
[1365.030831] add
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.3/host12 (scsi) UDEV
[1365.032738] add
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.3/host12/scsi_host/host12
(scsi_host) UDEV  [1365.033917] bind
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.3 (usb)
KERNEL[1365.040189] add      /module/usbserial (module)
KERNEL[1365.040224] add      /bus/usb-serial (bus) KERNEL[1365.040238]
add      /bus/usb/drivers/usbserial_generic (drivers)
KERNEL[1365.040252] add      /bus/usb-serial/drivers/generic (drivers)
UDEV  [1365.041030] add      /module/usbserial (module) UDEV
[1365.041766] add      /bus/usb/drivers/usbserial_generic (drivers)
KERNEL[1365.043015] add      /module/usb_wwan (module) UDEV
[1365.043360] add      /module/usb_wwan (module) KERNEL[1365.058772]
add      /module/mii (module) UDEV  [1365.059187] add      /module/mii
(module) KERNEL[1365.061788] add      /module/usbnet (module) UDEV
[1365.062272] add      /module/usbnet (module) UDEV  [1365.064388] add
    /bus/usb-serial (bus) KERNEL[1365.067093] add      /module/option
(module) KERNEL[1365.067117] add      /bus/usb/drivers/option (drivers)
KERNEL[1365.067129] add      /bus/usb-serial/drivers/option1 (drivers)
KERNEL[1365.067140] add
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.0/ttyUSB0 (usb-serial)
KERNEL[1365.067422] add
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.0/ttyUSB0/tty/ttyUSB0
(tty) KERNEL[1365.067445] bind
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.0/ttyUSB0 (usb-serial)
KERNEL[1365.067470] bind
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.0 (usb)
KERNEL[1365.067483] add
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.1/ttyUSB1 (usb-serial)
KERNEL[1365.067738] add
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.1/ttyUSB1/tty/ttyUSB1
(tty) KERNEL[1365.067759] bind
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.1/ttyUSB1 (usb-serial)
KERNEL[1365.067781] bind
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.1 (usb) UDEV
[1365.068818] add
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.1 (usb) UDEV
[1365.075932] add
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.0 (usb) UDEV
[1365.079617] add      /bus/usb-serial/drivers/generic (drivers) UDEV
[1365.080037] add      /bus/usb/drivers/option (drivers) UDEV
[1365.080219] add      /module/option (module) UDEV  [1365.080705] add
    /bus/usb-serial/drivers/option1 (drivers) KERNEL[1365.092103] add
   /module/cdc_ncm (module) KERNEL[1365.092138] add
/bus/usb/drivers/cdc_ncm (drivers) UDEV  [1365.095080] add
/module/cdc_ncm (module) UDEV  [1365.095601] add
/bus/usb/drivers/cdc_ncm (drivers) KERNEL[1365.107468] add
/module/cdc_wdm (module) KERNEL[1365.107506] add
/bus/usb/drivers/cdc_wdm (drivers) UDEV  [1365.108075] add
/module/cdc_wdm (module) UDEV  [1365.108457] add
/bus/usb/drivers/cdc_wdm (drivers) KERNEL[1365.122610] add
/module/huawei_cdc_ncm (module) UDEV  [1365.123113] add
/module/huawei_cdc_ncm (module) KERNEL[1365.144332] add
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.2/usbmisc/cdc-wdm0
(usbmisc) KERNEL[1365.144372] add
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.2/net/wwan0 (net)
KERNEL[1365.144385] add
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.2/net/wwan0/queues/rx-0
(queues) KERNEL[1365.144397] add
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.2/net/wwan0/queues/tx-0
(queues) KERNEL[1365.144947] bind
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.2 (usb)
KERNEL[1365.144970] add      /bus/usb/drivers/huawei_cdc_ncm (drivers)
UDEV  [1365.145741] add      /bus/usb/drivers/huawei_cdc_ncm (drivers)
UDEV  [1365.145987] add
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.2 (usb) UDEV
[1365.173545] bind     /devices/pci0000:00/0000:00:12.2/usb1/1-3 (usb)
UDEV  [1365.174528] add
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.2/usbmisc/cdc-wdm0
(usbmisc) UDEV  [1365.181187] add
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.1/ttyUSB1 (usb-serial)
UDEV  [1365.183583] add
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.0/ttyUSB0 (usb-serial)
UDEV  [1365.214000] add
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.2/net/wwan0 (net) UDEV
[1365.236972] add
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.2/net/wwan0/queues/rx-0
(queues) UDEV  [1365.238106] add
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.2/net/wwan0/queues/tx-0
(queues) UDEV  [1365.239192] bind
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.2 (usb) UDEV
[1365.265560] add
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.0/ttyUSB0/tty/ttyUSB0
(tty) UDEV  [1365.281788] bind
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.0/ttyUSB0 (usb-serial)
UDEV  [1365.283287] bind
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.0 (usb) UDEV
[1365.285541] add
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.1/ttyUSB1/tty/ttyUSB1
(tty) UDEV  [1365.302443] bind
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.1/ttyUSB1 (usb-serial)
UDEV  [1365.307082] bind
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.1 (usb)
KERNEL[1366.027277] add
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.3/host12/target12:0:0
(scsi) KERNEL[1366.027324] add
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.3/host12/target12:0:0/12:0:0:0
(scsi) KERNEL[1366.027571] add
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.3/host12/target12:0:0/12:0:0:0/scsi_disk/12:0:0:0
(scsi_disk) KERNEL[1366.027615] bind
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.3/host12/target12:0:0/12:0:0:0
(scsi) KERNEL[1366.027628] add
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.3/host12/target12:0:0/12:0:0:0/scsi_device/12:0:0:0
(scsi_device) UDEV  [1366.029865] add
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.3/host12/target12:0:0
(scsi) KERNEL[1366.030184] add
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.3/host12/target12:0:0/12:0:0:0/bsg/12:0:0:0
(bsg) UDEV  [1366.031759] add
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.3/host12/target12:0:0/12:0:0:0
(scsi) KERNEL[1366.032256] add      /devices/virtual/bdi/8:144 (bdi)
UDEV  [1366.032569] add      /devices/virtual/bdi/8:144 (bdi) UDEV
[1366.033283] add
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.3/host12/target12:0:0/12:0:0:0/scsi_disk/12:0:0:0
(scsi_disk) UDEV  [1366.034254] bind
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.3/host12/target12:0:0/12:0:0:0
(scsi) UDEV  [1366.035501] add
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.3/host12/target12:0:0/12:0:0:0/bsg/12:0:0:0
(bsg) UDEV  [1366.036627] add
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.3/host12/target12:0:0/12:0:0:0/scsi_device/12:0:0:0
(scsi_device) KERNEL[1366.041833] add
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.3/host12/target12:0:0/12:0:0:0/block/sdj
(block) KERNEL[1366.041892] add
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.3/host12/target12:0:0/12:0:0:0/block/sdj/sdj1
(block) UDEV  [1367.661420] add
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.3/host12/target12:0:0/12:0:0:0/block/sdj
(block) UDEV  [1368.464674] add
/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.3/host12/target12:0:0/12:0:0:0/block/sdj/sdj1
(block)

Модем ожил

Вопрос какое мне правило создать для этого модема, чтобы не вызывать
команду вручную ?

-- 
==========================
С уважением, Руслан Хихин
==========================


Подробная информация о списке рассылки Sisyphus