[PATCH 2/3] Disable lvm2 udev rules if `dmsetup splitname` fails

Demi Marie Obenour <[email protected]>
Newsgroups gmane.linux.lvm.general
Message-ID <Yktq8dapJmOv8suO@itl-email>
If the output of `dmsetup splitname` cannot be trusted, the safest
option is to disable all lvm2 rules.
---
 udev/11-dm-lvm.rules.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/udev/11-dm-lvm.rules.in b/udev/11-dm-lvm.rules.in
index 7c58994..f7066b7 100644
--- a/udev/11-dm-lvm.rules.in
+++ b/udev/11-dm-lvm.rules.in
@@ -18,7 +18,7 @@ ENV{DM_UDEV_RULES_VSN}!="?*", GOTO="lvm_end"
 ENV{DM_UUID}!="LVM-?*", GOTO="lvm_end"
 
 # Use DM name and split it up into its VG/LV/layer constituents.
-IMPORT{program}="(DM_EXEC)/dmsetup splitname --nameprefixes --noheadings --rows $env{DM_NAME}"
+IMPORT{program}!="(DM_EXEC)/dmsetup splitname --nameprefixes --noheadings --rows $env{DM_NAME}", GOTO="lvm_disable"
 
 # DM_SUBSYSTEM_UDEV_FLAG0 is the 'NOSCAN' flag for LVM subsystem.
 # This flag is used to temporarily disable selected rules to prevent any
-- 
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/+cIsEFAmJLavEACgkQsoi1X/+c
IsG9Ig/+N6F10lrWqSo8xLt1ziQhgYTSCfaECCfO3/6MW09s+LhWB6JewFuyvb0q
50OO7yQUOh8XvfAWLrUwfkaprW6xjlWEuVp24fk74baw9njFqWlgJhMmOWeVekCY
GiFxQdNBJF7gqweIVSij25jSzLEBaLbyEeHyiMCkIIExDrXw9wEKf/sRC5+PnRN3
VCz4TFWi8gYHLgL6erldnsR/s2/qsmxrP/67A7q68TM11ZE4ifiMbGKEcsOqGl/v
kKbwwnzGPKQVGveENVul8h2qOCdv2bZRoX5xq93tycOZB4aK+Wwoz8FPMhownym7
/X+TFG1a63rzDTOg6BSI2nry8qN43/PS9bzV4OYanty5tk01u2ufLM7eNCuCgoR9
/2W5R24fj9r8YJKufn3pyZ4arGTEbOa73A5yGzY0MEbBOA5TYiM4w5tDitD5WeL6
q4Lr+pE3rjRarTXMTGCvAfOzdKFVDbJN51NcKU7FfChNFrYm/Ks0G5prP4eKCL53
MEZT75AP1PbxE3U5TArs/FM1QdZdoQ9bFo8rCKv4+gca5bOQGTTnJ1Bb/JLSEMQc
7BwbIhuXs0arSKdLVqFOn57x0b16DcQiBnmRCxIk6a0EI5l5BP2CbwzBVLhAb+kV
GDMneo4oL4jXhCf8bewyIYUmmF+EVBlSZh0rYhqsbGABewUCNa0=
=Z1ny
-----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.