chiark / gitweb /
udev: builtin - use RUN rather than IMPORT for loading modules
authorTom Gundersen <teg@jklm.no>
Sat, 16 Mar 2013 08:26:47 +0000 (17:26 +0900)
committerTom Gundersen <teg@jklm.no>
Mon, 18 Mar 2013 17:28:59 +0000 (18:28 +0100)
The 'kmod' builtin, like the 'firmware' and 'uaccess' builtins, does not set
any variables, so don't use IMPORT.

Notice that this changes the behaviour slightly: the processing of subsequent
rules for the event that loads a module will no longer wait for the module
loading to finish. This is not expected to cause any problems, but we should
keep an eye on it.

rules/80-drivers.rules

index a0615cc3b2f81be4d8ee07a161f6248b2f328955..50523e4333262e38ffc2efbb0e5444868b0f3c65 100644 (file)
@@ -2,12 +2,12 @@
 
 ACTION=="remove", GOTO="drivers_end"
 
-DRIVER!="?*", ENV{MODALIAS}=="?*", IMPORT{builtin}="kmod load $env{MODALIAS}"
-SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="SD", IMPORT{builtin}="kmod load tifm_sd"
-SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="MS", IMPORT{builtin}="kmod load tifm_ms"
-SUBSYSTEM=="memstick", IMPORT{builtin}="kmod load ms_block mspro_block"
-SUBSYSTEM=="i2o", IMPORT{builtin}="kmod load i2o_block"
+DRIVER!="?*", ENV{MODALIAS}=="?*", RUN{builtin}="kmod load $env{MODALIAS}"
+SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="SD", RUN{builtin}="kmod load tifm_sd"
+SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="MS", RUN{builtin}="kmod load tifm_ms"
+SUBSYSTEM=="memstick", RUN{builtin}="kmod load ms_block mspro_block"
+SUBSYSTEM=="i2o", RUN{builtin}="kmod load i2o_block"
 SUBSYSTEM=="module", KERNEL=="parport_pc", RUN{builtin}="kmod load ppdev"
-KERNEL=="mtd*ro", ENV{MTD_FTL}=="smartmedia", IMPORT{builtin}="kmod load sm_ftl"
+KERNEL=="mtd*ro", ENV{MTD_FTL}=="smartmedia", RUN{builtin}="kmod load sm_ftl"
 
 LABEL="drivers_end"