[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

логика udev rules



преамбула: у нас используются кпк с palmos, программа синхронизации - coldsync.
раньше coldsync запускался из hotplug, решил мигрировать-таки на udev.

написал вот такой rule:
#Own udev rule for PalmOS devices
#BUS!="usb", GOTO="coldsync_rules_end"
#ACTION!="add", GOTO="coldsync_rules_end"
#ENV{DEVTYPE}!="usb_device", GOTO="coldsync_rules_end"

SYSFS{idVendor}=="082d", SYSFS{idProduct}=="0100", GOTO="coldsync_detected"
SYSFS{idVendor}=="082d", SYSFS{idProduct}=="0200", GOTO="coldsync_detected"
SYSFS{idVendor}=="082d", SYSFS{idProduct}=="0300", GOTO="coldsync_detected"
SYSFS{idVendor}=="0830", SYSFS{idProduct}=="0001", GOTO="coldsync_detected"
SYSFS{idVendor}=="0830", SYSFS{idProduct}=="0002", GOTO="coldsync_detected"
SYSFS{idVendor}=="0830", SYSFS{idProduct}=="0003", GOTO="coldsync_detected"
SYSFS{idVendor}=="0830", SYSFS{idProduct}=="0020", GOTO="coldsync_detected"
SYSFS{idVendor}=="0830", SYSFS{idProduct}=="0080", GOTO="coldsync_detected"
SYSFS{idVendor}=="0830", SYSFS{idProduct}=="0040", GOTO="coldsync_detected"
SYSFS{idVendor}=="0830", SYSFS{idProduct}=="0050", GOTO="coldsync_detected"
SYSFS{idVendor}=="0830", SYSFS{idProduct}=="0060", GOTO="coldsync_detected"
SYSFS{idVendor}=="0830", SYSFS{idProduct}=="0031", GOTO="coldsync_detected"
SYSFS{idVendor}=="0830", SYSFS{idProduct}=="0061", GOTO="coldsync_detected"
SYSFS{idVendor}=="0830", SYSFS{idProduct}=="0070", GOTO="coldsync_detected"
SYSFS{idVendor}=="054c", SYSFS{idProduct}=="0038", GOTO="coldsync_detected"
SYSFS{idVendor}=="054c", SYSFS{idProduct}=="0066", GOTO="coldsync_detected"
SYSFS{idVendor}=="054c", SYSFS{idProduct}=="0095", GOTO="coldsync_detected"
SYSFS{idVendor}=="054c", SYSFS{idProduct}=="009a", GOTO="coldsync_detected"
SYSFS{idVendor}=="054c", SYSFS{idProduct}=="00da", GOTO="coldsync_detected"
SYSFS{idVendor}=="054c", SYSFS{idProduct}=="00e9", GOTO="coldsync_detected"
SYSFS{idVendor}=="054c", SYSFS{idProduct}=="0144", GOTO="coldsync_detected"
SYSFS{idVendor}=="054c", SYSFS{idProduct}=="0169", GOTO="coldsync_detected"
SYSFS{idVendor}=="04e8", SYSFS{idProduct}=="8001", GOTO="coldsync_detected"
SYSFS{idVendor}=="04e8", SYSFS{idProduct}=="6601", GOTO="coldsync_detected"
SYSFS{idVendor}=="091e", SYSFS{idProduct}=="0004", GOTO="coldsync_detected"
SYSFS{idVendor}=="4766", SYSFS{idProduct}=="0001", GOTO="coldsync_detected"
SYSFS{idVendor}=="0c88", SYSFS{idProduct}=="0021", GOTO="coldsync_detected"

GOTO="coldsync_rules_end"

LABEL="coldsync_detected"
BUS=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", RUN+="/usr/bin/coldsync -md -n USB1 -d io:1"

LABEL="coldsync_rules_end"

в таком виде работает, а если убираю комментарии в трёх первых правилах - не работает.
может быть я неправильно понял как устроены эти самые rules?


Reply to: