class PackerFiles::Ubuntu::Desktop

Public Class Methods

new() click to toggle source

Constructor. Yield self for further initialization

Calls superclass method PackerFiles::Ubuntu::Server::new
# File lib/PackerFiles/OS/Ubuntu/Desktop.rb, line 13
def initialize
   super
end

Public Instance Methods

boot_command() click to toggle source

Boot Command Override

# File lib/PackerFiles/OS/Ubuntu/Desktop.rb, line 41
def boot_command
   file  = PackerFiles.DirPath('Ubuntu/Templates/boot_command_desktop_erb.rb')
   hash  = { 'obj' => self}
   value = PackerFiles.evaluate_erb(file.first, hash)
   value.split("\n")
end
cd_image_hook() click to toggle source

Hook function called before normalizing CD Image

# File lib/PackerFiles/OS/Ubuntu/Desktop.rb, line 18
def cd_image_hook
   self.CDImage.impl = Ubuntu::DesktopCD.new
end
preseed_file() click to toggle source

Name of the preseed file

# File lib/PackerFiles/OS/Ubuntu/Desktop.rb, line 33
def preseed_file
   rel  = self.CDImage.release
   arch = self.CDImage.arch
   name = "preseed-ubuntu-desktop-#{rel}-#{arch}.cfg"
   File.join(http_dir, name)
end
preseed_write_hook(objects) click to toggle source

Hook for writing into preseed file.

# File lib/PackerFiles/OS/Ubuntu/Desktop.rb, line 23
def preseed_write_hook(objects)

   # Get Preseed object from the base class.
   preseed = super

   # Generate Ubiquity specific sections.
   preseed.eval_file 'Ubuntu/Templates/ubiquity_erb.rb', {'obj' => self}
end