Merge remote-tracking branch 'origin/github/pr/145'
[grml-live.git] / etc / grml / fai / config / scripts / GRMLBASE / 50-lvm
index 9ec8199..1f65279 100755 (executable)
@@ -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