9990-misc-helpers.sh: fix RAID detection for findiso.
authorMihai Moldovan <ionic@ionic.de>
Wed, 24 Mar 2021 11:31:29 +0000 (12:31 +0100)
committerMihai Moldovan <ionic@ionic.de>
Thu, 25 Mar 2021 05:20:12 +0000 (06:20 +0100)
The local-top mdadm script was replaced with:
  1.) systemd integration
  2.) a local-block mdadm script for initramfs-tools-based setups
in Debian stretch, so this part was broken ever since.

Use the "new" local-block mdadm script instead.

This one won't allow us to select a specific device to assemble, so just
let it start all of them and hope for the best.

Closes: https://github.com/grml/grml/issues/125

components/9990-misc-helpers.sh

index 8551385..1267a67 100755 (executable)
@@ -251,12 +251,13 @@ check_dev ()
 
                        /dev/md*)
                                # Adding raid support
-                               if [ -x /scripts/local-top/mdadm ]
+                               if [ -x /scripts/local-block/mdadm ]
                                then
-                                       [ -r /conf/conf.d/md ] && cp /conf/conf.d/md /conf/conf.d/md.orig
-                                       echo "MD_DEVS=$device " >> /conf/conf.d/md
-                                       /scripts/local-top/mdadm >>/boot.log
-                                       [ -r /conf/conf.d/md.orig ] && mv /conf/conf.d/md.orig /conf/conf.d/md
+                                       # Back in the day, when there was still a local-top mdadm script, we
+                                       # used to select specific devices to be auto-assembled.
+                                       # This functionality was dropped in the local-block script, so just
+                                       # scan and assemble all RAID devices.
+                                       /scripts/local-block/mdadm >>/boot.log
                                fi
                                ;;
                esac