class CFA::Grub2::GrubCfg
Represents generated grub configuration at /boot/grub2/grub.cfg Main features:
-
List of generated sections including translations
Constants
- PATH
Public Class Methods
new(file_handler: nil)
click to toggle source
Calls superclass method
# File lib/cfa/grub2/grub_cfg.rb, line 48 def initialize(file_handler: nil) super(Parser, PATH, file_handler: file_handler) end
Public Instance Methods
boot_entries()
click to toggle source
@return [Array<Hash>] return boot entries containing `title:` as shown on screen and `path:` whole path usable for grub2-set-default including also submenu part of path @note Some entries are not in fact bootable, such as the “run snaper rollback” hint-only entry on SUSE. They are ignored. As a hack, they are recognized by double quote delimiters while the regular entries use single quotes.
# File lib/cfa/grub2/grub_cfg.rb, line 65 def boot_entries data end
sections()
click to toggle source
@return [Array<String>] sections from grub.cfg in order as they appear @deprecated use instead boot_entries
# File lib/cfa/grub2/grub_cfg.rb, line 54 def sections data.map { |p| p[:title] } end