]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
rules: load drivers only on "add" events 6802/head
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 11 Sep 2017 18:47:38 +0000 (11:47 -0700)
committerHarald Hoyer <harald@redhat.com>
Mon, 11 Sep 2017 19:04:34 +0000 (21:04 +0200)
Previously we were loading kernel modules on all device events save
for "remove". With the introduction of KOBJ_BIND/KOBJ_UNBIND this causes
issues, as driver modules that have devices bound to their drivers get
immediately reloaded, and it appears to the user that module unloading
does not work.

Let's change the rules to only load modules on "add" events instead.

rules/80-drivers.rules

index 8551f47a4b433b85d131bdbb2acb4052f0b39b2d..16fa5d8e3233b9026240e71e2453ec4c1e10a489 100644 (file)
@@ -1,6 +1,6 @@
 # do not edit this file, it will be overwritten on update
 
-ACTION=="remove", GOTO="drivers_end"
+ACTION!="add", GOTO="drivers_end"
 
 ENV{MODALIAS}=="?*", RUN{builtin}+="kmod load $env{MODALIAS}"
 SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="SD", RUN{builtin}+="kmod load tifm_sd"