[PATCH 3/3] Disable udev rules if udev flags can't be obtained

Demi Marie Obenour <[email protected]>
Newsgroups gmane.linux.lvm.general
Message-ID <Yktpc1D42QLEFqgI@itl-email>
In this cased the safest option is to disable most udev rules.
---
 udev/10-dm.rules.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/udev/10-dm.rules.in b/udev/10-dm.rules.in
index b4fa52a..9fae8df 100644
--- a/udev/10-dm.rules.in
+++ b/udev/10-dm.rules.in
@@ -50,7 +50,7 @@ ACTION!="add|change", GOTO="dm_end"
 # These flags are encoded in DM_COOKIE variable that was introduced in
 # kernel version 2.6.31. Therefore, we can use this feature with
 # kernels >= 2.6.31 only. Cookie is not decoded for remove event.
-ENV{DM_COOKIE}=="?*", IMPORT{program}="(DM_EXEC)/dmsetup udevflags $env{DM_COOKIE}"
+ENV{DM_COOKIE}=="?*", IMPORT{program}!="(DM_EXEC)/dmsetup udevflags $env{DM_COOKIE}", GOTO="dm_disable"
 
 # Rule out easy-to-detect inappropriate events first.
 ENV{DISK_RO}=="1", GOTO="dm_disable"
-- 
Sincerely,
Demi Marie Obenour (she/her/hers)
Invisible Things Lab

_______________________________________________
linux-lvm mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEdodNnxM2uiJZBxxxsoi1X/+cIsEFAmJLaXMACgkQsoi1X/+c
IsH2DQ/+JBk2eUygjeS2Z/sXEQ+86HNYRrd6aRfWHwvLGITgqiuW/3stx3OzYOLJ
QlIL8xd306y1Y2DpkCACjxSanD+vUYF5g+pFZd3FWCbMIjw+rj+eBO70OyeXNIxn
LghR8kju9fxJ+nVbcqF7C8EdllZUdAUO9blpmX8hUy09T7UKZh2D5q1yz3pKbDPK
9L5CIFKiqSs24ReD38sz1Wz/xUMfCL5GrwjUGIaCyPlVVJf9hcYgow41cDoZIsFw
H2zsJnHtqlQ1x+ofaNYvwjkChJAZko74BENBMFPz0pItavsjqDQT7w0e37LL/XMl
nyEoLm6UVFav7W9/PNdYY5JElNpErXrMPeShRtmZxHBHtymahMq5BbcODME3Wobv
8ROiWXJwTHDTGaH7DMdGETPGhFau2TSJgG4zFxHddFGuxduo2lySPKD9o4duUCmv
YJ3uaDRIGKBIpnWHJP894M+uL0obWXB8z5pXyWbxJEKH1J5iG9K+AbGVZ89hTBDv
LDkt+HL7T5vwQaTWIkugrBsXcwttHz65UMhmUunKfsJFZfXehk7w6hMpBLbMKKqb
0qivHXKG7kATJrn3J0Kz+vZlysjPSX8r4HtfWnSTws0XrVawLRjF5A18P+eN1tna
iqh16PCVWwaIv0l2LsjLpY8/c279xwNpwY5VBnPRaks/VYXrJTI=
=7iC6
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.