fix bad merge of upstream config
authorIan Kelling <iank@fsf.org>
Mon, 20 May 2024 20:13:19 +0000 (16:13 -0400)
committerIan Kelling <iank@fsf.org>
Mon, 20 May 2024 20:13:19 +0000 (16:13 -0400)
fai/config/scripts/GRUB_PC/10-setup

index ed8d878ae0395bee09028706c56e9a922fd26510..7ea23fd34295565d806df14fb8bd27af5f9af84b 100755 (executable)
@@ -84,10 +84,11 @@ if [[ $BOOT_DEVICE =~ '/dev/md' ]]; then
 else
   for dev in $BOOT_DEVICE; do
     mbrdev=$(get_stable_devname $dev)
-    if [ -z "$mbrdevices" ]; then
+    if [ -z "$mbrdev" ]; then
       # if we cannot find a persistent name (for e.g. in a VM) use old name
-      mbrdevices+="$dev, "
+      mbrdev="$dev"
     fi
+    mbrdevices+="$mbrdev, "
     echo "Installing grub on $dev = $mbrdev"
     $ROOTCMD grub-install --no-floppy "$mbrdev"
   done