scripts/GRMLBASE/52-mdadm: unconditionally clear 64-md-raid-assembly.rules
authorMichael Prokop <mika@grml.org>
Fri, 10 Jul 2020 09:14:57 +0000 (11:14 +0200)
committerMichael Prokop <mika@grml.org>
Fri, 10 Jul 2020 09:16:28 +0000 (11:16 +0200)
Similar to what we did in commit 31cd53a8b for LVM,
if /lib/udev/rules.d/64-md-raid-assembly.rules was removed by a
prior run of the unpatched script,
the patched script will fail to create the placeholder file.

This work was funded by Grml-Forensic.

etc/grml/fai/config/scripts/GRMLBASE/52-mdadm

index 1bceb58..625065f 100755 (executable)
@@ -9,11 +9,6 @@
 set -u
 set -e
 
 set -u
 set -e
 
-if ! [ -r "${target}/lib/udev/rules.d/64-md-raid-assembly.rules" ] ; then
-  echo "File /lib/udev/rules.d/64-md-raid-assembly.rules doesn't exist, skipping execution of script."
-  exit 0
-fi
-
 echo "Removing /lib/udev/rules.d/64-md-raid-assembly.rules to avoid automatic mdadm scanning"
 echo '# this file was generated by grml-live script GRMLBASE/52-mdadm' > "${target}/lib/udev/rules.d/64-md-raid-assembly.rules"
 
 echo "Removing /lib/udev/rules.d/64-md-raid-assembly.rules to avoid automatic mdadm scanning"
 echo '# this file was generated by grml-live script GRMLBASE/52-mdadm' > "${target}/lib/udev/rules.d/64-md-raid-assembly.rules"