--- toast-linux	2005/03/01 05:22:12	1.146
+++ toast-linux	2005/03/05 05:59:18	1.147
@@ -264,12 +264,12 @@
           totalm="$five"
           totalk="$six"
         fi
-        [ "$one $two $three" = "Disk label type:" ] && labeltype="$one"
+        [ "$one $two $three" = "Disk label type:" ] && labeltype="$four"
         case "$one" in
           [0-9]*)
             [ "$one" -gt "$lastminor" ] && lastminor="$one"
             [ "$six" = "extended" ] && extminor="$one"
-            [ "$six" = "primary" ] && eval "primary${one}exists=yes"
+            [ "$six" = "primary" ] && eval "primary$one""exists=yes"
             ;;
         esac
       done < "$tmpfile"
@@ -278,7 +278,7 @@
 
     freeslot=0
     for slot in 4 3 2; do
-      eval "[ -n \$primary{$slot}used ]" && freeslot="$slot"
+      eval "[ -n \$primary$slot""exists ]" && freeslot="$slot"
     done
 
     if [ -n "$overwrite" ]; then