}
function save_chosen {
- last_boot=$CHOSEN
save_vars did_fai_check last_boot
}
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
}
break
fi
menuentry $dir --id=$dir {
+ last_boot=$1
save_chosen
configfile $1/grub/grub.cfg
}