Sha256: eb1fbd29aaef566055d57bc36b687ebcacb41b59f5e385ba63df24213ceff2c1
Contents?: true
Size: 937 Bytes
Versions: 4
Compression:
Stored size: 937 Bytes
Contents
class Setting::Bootdisk< ::Setting def self.load_defaults return unless ActiveRecord::Base.connection.table_exists?('settings') return unless super ipxe = ['/usr/lib/ipxe'].find { |p| File.exist?(p) } || '/usr/share/ipxe' syslinux = ['/usr/lib/syslinux'].find { |p| File.exist?(p) } || '/usr/share/syslinux' Setting.transaction do [ self.set('bootdisk_ipxe_dir', _('Path to directory containing iPXE images'), ipxe), self.set('bootdisk_syslinux_dir', _('Path to directory containing syslinux images'), syslinux), self.set('bootdisk_host_template', _('gPXE template to use for host-specific boot disks'), 'Boot disk gPXE - host'), self.set('bootdisk_generic_host_template', _('gPXE template to use for generic host boot disks'), 'Boot disk gPXE - generic host'), ].compact.each { |s| self.create s.update(:category => "Setting::Bootdisk") } end true end end
Version data entries
4 entries across 4 versions & 1 rubygems