From: Michael Prokop Date: Mon, 4 Jul 2022 16:18:48 +0000 (+0200) Subject: GRMLBASE/50-lvm: also clear /lib/udev/rules.d/69-lvm.rules X-Git-Tag: v0.40.3~2 X-Git-Url: http://git.grml.org/?p=grml-live.git;a=commitdiff_plain;h=482cb8d334a5aa4242816d5ab973555cfb46bc96;hp=fbb6bf9401cbd232c812ece217367b57d1afa38d GRMLBASE/50-lvm: also clear /lib/udev/rules.d/69-lvm.rules We don't want automatic lvm_scan, new udev upstream release 2.03.15 includes a new file /lib/udev/rules.d/69-lvm.rules, so let's check for presence of /lib/udev/rules.d/69-lvm.rules and /lib/udev/rules.d/69-lvm-metad.rules and clear any possibly existing files then. Related to https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1014314 --- diff --git a/etc/grml/fai/config/scripts/GRMLBASE/50-lvm b/etc/grml/fai/config/scripts/GRMLBASE/50-lvm index 9ec8199..1f65279 100755 --- a/etc/grml/fai/config/scripts/GRMLBASE/50-lvm +++ b/etc/grml/fai/config/scripts/GRMLBASE/50-lvm @@ -9,8 +9,15 @@ set -u set -e -echo "Clearing /lib/udev/rules.d/69-lvm-metad.rules to avoid automatic LVM scanning" -echo '# this file was generated by grml-live script GRMLBASE/50-lvm' > "${target}/lib/udev/rules.d/69-lvm-metad.rules" +if [ -f "${target}/lib/udev/rules.d/69-lvm.rules" ] ; then # lvm2 >=2.03.15 + echo "Clearing /lib/udev/rules.d/69-lvm.rules to avoid automatic LVM scanning" + echo '# this file was generated by grml-live script GRMLBASE/50-lvm' > "${target}/lib/udev/rules.d/69-lvm.rules" +fi + +if [ -f "${target}/lib/udev/rules.d/69-lvm-metad.rules" ] ; then # lvm2 <= 2.03.11 + echo "Clearing /lib/udev/rules.d/69-lvm-metad.rules to avoid automatic LVM scanning" + echo '# this file was generated by grml-live script GRMLBASE/50-lvm' > "${target}/lib/udev/rules.d/69-lvm-metad.rules" +fi ## END OF FILE ################################################################# # vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=2