Sha256: 0fdd0e575e2917a5e181981c0e25f313250f95b95701e174a3ba4e29f7d4c1fb
Contents?: true
Size: 797 Bytes
Versions: 2
Compression:
Stored size: 797 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'), ].compact.each { |s| self.create s.update(:category => "Setting::Bootdisk") } end true end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
foreman_bootdisk-1.1.0 | app/models/setting/bootdisk.rb |
foreman_bootdisk-1.0.0 | app/models/setting/bootdisk.rb |