various fixes
[automated-distro-installer] / fai / config / distro-install-common / libreboot_grub.cfg
index b48ea52889d2cff95d015242dcd410bef1e29370..32ab3922a5a79945b50260007ece5148a6f498a7 100644 (file)
@@ -10,7 +10,6 @@ function save_vars {
 }
 
 function save_chosen {
-    last_boot=$CHOSEN
     save_vars did_fai_check last_boot
 }
 
@@ -37,6 +36,10 @@ did_fai_check=false
 
 bs_dir=/debianstable_bootstrap
 menuentry $bs_dir --id=$bs_dir {
+    # note, we might be able to use $chosen and avoid setting this here,
+    # and set it inside save_chosen. but I haven't tested it,
+    # it's just one less line of repitition.
+    last_boot=$1
     save_chosen
     configfile $bs_dir/boot/grub/grub.cfg
 }
@@ -46,6 +49,7 @@ for dir in  /boot_*; do
         break
     fi
     menuentry $dir --id=$dir {
+        last_boot=$1
         save_chosen
         configfile $1/grub/grub.cfg
     }