#3 Set GRUB2 default on beadm activate

Issue #3. Closes #18 (closed).

A (unit) test:

vozhx-thinkpad / # beadm activate -v funtoo-1
  Command: "grub-set-default "Gentoo GNU/Linux - sm/ROOT/funtoo-1""
Activated successfully
vozhx-thinkpad / # cat /boot/grub/grubenv
# GRUB Environment Block
saved_entry=Gentoo GNU/Linux - sm/ROOT/funtoo-1
########<...>##

A system test:

  1. Set GRUB_DEFAULT=saved in /etc/default/grub.
  2. beadm create new
  3. beadm activate new
  4. (was already working) zpool get -H -o value bootfs ci == ci/ROOT/new
  5. Reboot and check that the Gentoo GNU/Linux - ci/ROOT/new entry is the default
  6. Choose (boot) the entry
  7. mount | grep ' / ' | cut -d\ -f1 == ci/ROOT/new

A system test for ci!10 (merged):

  1. Points {1..3,5,6}
  2. beadm activate old
  3. Points {4..7} with ci/ROOT/old
Edited by Witaut Bajaryn

Merge request reports

Loading