Delete /lib/udev/rules.d/69-lvm-metad.rules to avoid automatic LVM scanning
authorMichael Prokop <mika@grml.org>
Fri, 12 May 2017 14:39:00 +0000 (16:39 +0200)
committerMichael Prokop <mika@grml.org>
Fri, 12 May 2017 19:00:01 +0000 (21:00 +0200)
This might not be enough yet according to initial tests, but
it's something we want to disable for sure.

See grml/grml#31

etc/grml/fai/config/scripts/GRMLBASE/50-lvm [new file with mode: 0755]

diff --git a/etc/grml/fai/config/scripts/GRMLBASE/50-lvm b/etc/grml/fai/config/scripts/GRMLBASE/50-lvm
new file mode 100755 (executable)
index 0000000..e94fc58
--- /dev/null
@@ -0,0 +1,21 @@
+#!/bin/bash
+# Filename:      ${GRML_FAI_CONFIG}/config/scripts/GRMLBASE/50-lvm
+# Purpose:       adjust LVM configuration
+# Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
+# Bug-Reports:   see http://grml.org/bugs/
+# License:       This file is licensed under the GPL v2 or any later version.
+################################################################################
+
+set -u
+set -e
+
+if ! [ -r "${target}/lib/udev/rules.d/69-lvm-metad.rules" ] ; then
+  echo "File /lib/udev/rules.d/69-lvm-metad.rules doesn't exist, skipping execution of script."
+  exit 0
+fi
+
+echo "Removing /lib/udev/rules.d/69-lvm-metad.rules to avoid automatic LVM scanning"
+rm -f "${target}/lib/udev/rules.d/69-lvm-metad.rules"
+
+## END OF FILE #################################################################
+# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=2