From cccf4b783f531c3afcde32c8fe58ceba9e07d62f Mon Sep 17 00:00:00 2001 From: Yuan Bai Date: Thu, 8 Jun 2017 11:21:05 +0800 Subject: [PATCH] =?UTF-8?q?fix=203224=20nodeset=20create=20dracut.*=20file?= =?UTF-8?q?=20in=20sles=20statelite=20cost=20too=20much=E2=80=A6=20(#3227)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix 3224 nodeset create dracut.* file in sles statelite cost too much time * polished based on comments --- xCAT-server/lib/xcat/plugins/sles.pm | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/sles.pm b/xCAT-server/lib/xcat/plugins/sles.pm index 164e6d46c..f69689a1e 100644 --- a/xCAT-server/lib/xcat/plugins/sles.pm +++ b/xCAT-server/lib/xcat/plugins/sles.pm @@ -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; } }