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

Demi Marie Obenour <[email protected]>
Newsgroups gmane.linux.lvm.general
Message-ID <YktpQgrkTyvnI9cQ@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/+cIsEFAmJLaUIACgkQsoi1X/+c
IsGcrw/7BmFHMPOtV2I3GXiZLLEZrbj+OhkQqvfD4PccKM1Vl3TAwIRLLaPPTgHH
rAJqD3tHWvPPEo6VenLUHYk1Ga8RZJ7CMC6CNHpz3K4P3IJ1peo22qbnltz+mSnT
B9LuIDXBI3ovbEOA6fmDgeH6MQnQxvT+5N+OMtotqVbWYnaA3yhI30lNoiOo9OPx
zRl3OLZIjV80iifDSIWvpzIgEyeG7h5zqKE+fPYZ8G48BkdSEoYbPWTJgQRGB7RP
E38JWSDTY+y2KtEoWxbWGRHYAzKsLWg0NElKZYZk+4ftR3xluqClQ/gWkLA71XJX
LpDUXCNFjrZDgSPh1UJuIMn5Kp+c8kb6BEziXshyJVo6aq6dHL3eUpWrK3m/OQZT
rsP0/AgN+Fhsu3GneGvLDDc+lxnJewrL7xryJzueQy5loaq7JtPkutAeAOgt5Ryf
jnvxmgprupfPvpIPTW7PDg8ghTdvrKWQaqxsSxoFHnkYVv6Z3GWbsxmTIj9skpzU
otDnOtZrTfS3FY97xi8Kw2y1cRurTwQu1yR0pLf9x9YfmfJyDp816HXwdjPcbk2X
7/g2+Y7dVq5Gl0198SkTT/AJc2+sv5gHXacii/EPDvO5NIfFYa1/YYgiXttDpBjo
ylRpLuZiedrKC4UZXlf+1lfVVk0hT+W27IbYnyV2ae88pHRfVSs=
=tPMt
-----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.