kpartx.rules: respect DM_UDEV_LOW_PRIORITY_FLAG
authorMartin Wilck <mwilck@suse.com>
Sat, 2 Sep 2017 22:38:53 +0000 (00:38 +0200)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Wed, 20 Sep 2017 16:02:06 +0000 (18:02 +0200)
kpartx.rules increased link priority unconditionally, but for
explicitly marked low prio devices that shouldn't be done.
Fix that. Also, use "+=" for OPTIONS, as most other rules do.

Signed-off-by: Martin Wilck <mwilck@suse.com>
kpartx/kpartx.rules

index ea34e44..efd21a2 100644 (file)
@@ -12,7 +12,7 @@ ENV{DM_UUID}!="?*", GOTO="kpartx_end"
 # with 0 dependencies
 IMPORT{program}=="kpartx_id %M %m $env{DM_UUID}"
 
-OPTIONS="link_priority=50"
+ENV{DM_UDEV_LOW_PRIORITY_FLAG}!="1", OPTIONS+="link_priority=50"
 
 ENV{DM_UUID}=="?*", ENV{DM_TYPE}=="?*" \
        SYMLINK+="disk/by-id/$env{DM_TYPE}-$env{DM_NAME}"