scripts/GRMLBASE/50-lvm: unconditionally clear 69-lvm-metad.rules file
authorMichael Prokop <mika@grml.org>
Wed, 1 Apr 2020 14:24:30 +0000 (16:24 +0200)
committerMichael Prokop <mika@grml.org>
Wed, 1 Apr 2020 14:24:30 +0000 (16:24 +0200)
If /lib/udev/rules.d/69-lvm-metad.rules was removed by a prior run of the unpatched script,
the patched script will fail to create the placeholder file.

Thanks: Dr. AndrĂ¡s Korn
Closes: https://github.com/grml/grml-live/issues/47

etc/grml/fai/config/scripts/GRMLBASE/50-lvm

index 4cecce4..9ec8199 100755 (executable)
@@ -9,11 +9,6 @@
 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 "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"