mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-10-21 15:18:19 +00:00
refactor(boot): expose the Genesis file selector
This commit is contained in:
@@ -7,9 +7,13 @@ use Exporter qw(import);
|
||||
|
||||
use xCAT::Utils;
|
||||
|
||||
our @EXPORT_OK = qw(_find_genesis_boot_files);
|
||||
our @EXPORT_OK = qw(find_genesis_boot_files _find_genesis_boot_files);
|
||||
|
||||
sub _find_genesis_boot_files {
|
||||
return find_genesis_boot_files(@_);
|
||||
}
|
||||
|
||||
sub find_genesis_boot_files {
|
||||
my ($tftpdir, $arch) = @_;
|
||||
return unless defined($arch) && $arch =~ /\A[A-Za-z0-9_]+\z/;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ use Thread qw(yield);
|
||||
use POSIX qw(WNOHANG nice);
|
||||
use xCAT::Table;
|
||||
use xCAT::Utils;
|
||||
use xCAT::BootUtils qw(_find_genesis_boot_files);
|
||||
use xCAT::BootUtils qw(find_genesis_boot_files _find_genesis_boot_files);
|
||||
use xCAT::TableUtils;
|
||||
use xCAT::NetworkUtils;
|
||||
use xCAT::MsgUtils;
|
||||
@@ -1987,7 +1987,7 @@ sub mksysclone
|
||||
=cut
|
||||
|
||||
my $ramdisk_size = 200000;
|
||||
my ($kernpath, $initrdpath) = _find_genesis_boot_files($tftpdir, $arch);
|
||||
my ($kernpath, $initrdpath) = find_genesis_boot_files($tftpdir, $arch);
|
||||
|
||||
if (defined($kernpath) && defined($initrdpath))
|
||||
{
|
||||
|
||||
@@ -11,7 +11,7 @@ use Sys::Syslog;
|
||||
use File::Temp qw/tempdir/;
|
||||
use xCAT::Table;
|
||||
use xCAT::Utils;
|
||||
use xCAT::BootUtils qw(_find_genesis_boot_files);
|
||||
use xCAT::BootUtils qw(find_genesis_boot_files _find_genesis_boot_files);
|
||||
use xCAT::TableUtils;
|
||||
use xCAT::NetworkUtils;
|
||||
use xCAT::SvrUtils;
|
||||
@@ -1452,7 +1452,7 @@ sub mksysclone
|
||||
# copy kernel and initrd from image dir to /tftpboot
|
||||
my $ramdisk_size = 200000;
|
||||
my ($genesis_kernel, $genesis_initrd) =
|
||||
_find_genesis_boot_files($tftpdir, $arch);
|
||||
find_genesis_boot_files($tftpdir, $arch);
|
||||
|
||||
if (defined($genesis_kernel) && defined($genesis_initrd))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user