summaryrefslogtreecommitdiff
path: root/debian/patches/use-tempnode-not-devnode.patch
blob: 38a550440cc01b6fc10028f83a64301774303b96 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From: Michael Tokarev <mjt@tls.msk.ru>
Subject: use tempnode not devnode in udev rules
Bug-Debian: http://bugs.debian.org/770883
Forwarded: no

udev in wheezy does not understand $devnode construct
in rules file, while upstream uses it in mdadm rules
files.  udev in jessie has $devnode and it also supports
old $tempnode which is the way it worked in wheezy and
before, even if $tempnode in jessie's udev is not documented.
So on jessie, both $tempnode and $devnode works fine, while
in wheezy, only $tempnode works.

Use $tempnode instead of $devnode.  Since mdadm is important
enough for system functionality and easily can break system
by making it unbootable, and this is the only incompatibility
between wheezy's and jessie's udev wrt mdadm, it is better than
having a versioned dependency on udev.

This patch is debian-specific and should be dropped for jessie+1.

--- a/udev-md-raid-arrays.rules
+++ b/udev-md-raid-arrays.rules
@@ -20 +20 @@
-IMPORT{program}="BINDIR/mdadm --detail --export $devnode"
+IMPORT{program}="BINDIR/mdadm --detail --export $tempnode"
--- a/udev-md-raid-assembly.rules
+++ b/udev-md-raid-assembly.rules
@@ -30 +30 @@
-ACTION=="add|change", IMPORT{program}="BINDIR/mdadm --incremental --export $devnode --offroot ${DEVLINKS}"
+ACTION=="add|change", IMPORT{program}="BINDIR/mdadm --incremental --export $tempnode --offroot ${DEVLINKS}"