2
0
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:
Yuan Bai
2017-06-08 11:21:05 +08:00
committed by yangsong
parent 9fd9e211d0
commit cccf4b783f

View File

@ -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;
}
}