mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-06-19 04:40:21 +00:00
fix 3224 nodeset create dracut.* file in sles statelite cost too much… (#3227)
* fix 3224 nodeset create dracut.* file in sles statelite cost too much time * polished based on comments
This commit is contained in:
@ -1707,12 +1707,10 @@ erver, if so, stop it first and try again" ],
|
||||
sub using_dracut
|
||||
{
|
||||
my $rootimgdir = shift;
|
||||
my $chkcmd = "chroot $rootimgdir/rootimg dracut --list-modules";
|
||||
my $rc = system($chkcmd);
|
||||
if ($rc) {
|
||||
return 0;
|
||||
} else {
|
||||
if ( -f "$rootimgdir/rootimg/etc/dracut.conf" ) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user