summaryrefslogtreecommitdiffstats
path: root/udev-md-raid-assembly.rules
diff options
context:
space:
mode:
authorMariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>2024-06-25 12:53:46 +0200
committerMariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>2024-09-10 12:24:25 +0200
commit9b8933bb6dbfcae1bd5a2f933c87684de99412de (patch)
tree8b85f333eaf933c5a539df3299cf3435bfec913f /udev-md-raid-assembly.rules
parentdlink.h: Fix checkpatch warnings for function args (diff)
downloadmdadm-9b8933bb6dbfcae1bd5a2f933c87684de99412de.tar.xz
mdadm-9b8933bb6dbfcae1bd5a2f933c87684de99412de.zip
Incremental: support devnode in IncrementalRemove.
There are no reasons to keep this interface different than others. Allow to use devnode but keep old way for backward compatibility. Method is added to verify that only devnode or kernel name is used. Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Diffstat (limited to 'udev-md-raid-assembly.rules')
-rw-r--r--udev-md-raid-assembly.rules4
1 files changed, 2 insertions, 2 deletions
diff --git a/udev-md-raid-assembly.rules b/udev-md-raid-assembly.rules
index d4a7f0a5..4cd2c6f4 100644
--- a/udev-md-raid-assembly.rules
+++ b/udev-md-raid-assembly.rules
@@ -41,7 +41,7 @@ ACTION=="change", KERNEL!="dm-*|md*", GOTO="md_inc_end"
ACTION!="remove", IMPORT{program}="BINDIR/mdadm --incremental --export $devnode --offroot $env{DEVLINKS}"
ACTION!="remove", ENV{MD_STARTED}=="*unsafe*", ENV{MD_FOREIGN}=="no", ENV{SYSTEMD_WANTS}+="mdadm-last-resort@$env{MD_DEVICE}.timer"
-ACTION=="remove", ENV{ID_PATH}=="?*", RUN+="BINDIR/mdadm -If $name --path $env{ID_PATH}"
-ACTION=="remove", ENV{ID_PATH}!="?*", RUN+="BINDIR/mdadm -If $name"
+ACTION=="remove", ENV{ID_PATH}=="?*", RUN+="BINDIR/mdadm -If $devnode --path $env{ID_PATH}"
+ACTION=="remove", ENV{ID_PATH}!="?*", RUN+="BINDIR/mdadm -If $devnode"
LABEL="md_inc_end"