X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/d1be18e9426db54d3cf367855ee95fd8ed117e3b..1df3edbee59a60ca0bd7005124c12e99205fd2d1:/cookbooks/hardware/templates/default/grub.erb diff --git a/cookbooks/hardware/templates/default/grub.erb b/cookbooks/hardware/templates/default/grub.erb index d69a870b9..3db559191 100644 --- a/cookbooks/hardware/templates/default/grub.erb +++ b/cookbooks/hardware/templates/default/grub.erb @@ -2,22 +2,7 @@ # Boot the first entry by default, unless we have configured # it to boot a specific version. -<% if node[:hardware][:grub][:kernel] == :latest %> -GRUB_DEFAULT="0" -<% else - df = Mixlib::ShellOut.new("df /boot/grub/grub.cfg | tail -n 1 | awk '{print $1;}'") - df.run_command - df.error! - root=df.stdout - - blkid = Mixlib::ShellOut.new("blkid -o value -s UUID #{root}") - blkid.run_command - blkid.error! - uuid=blkid.stdout - - version="#{node[:hardware][:grub][:kernel]}-generic" %> -GRUB_DEFAULT="gnulinux-advanced-<%= uuid %>>gnulinux-<%= version %>-advanced-<%= uuid %>" -<% end %> +GRUB_DEFAULT="<%= @entry %>" # Wait two seconds before booting the default entry GRUB_TIMEOUT="2"