From 4ad99269fe797fff13bb32bbb4e00466f3cee628 Mon Sep 17 00:00:00 2001 From: yangsong Date: Mon, 12 Mar 2018 17:40:39 +0800 Subject: [PATCH] fix issue: genimage tries direct DB access instead of via xCATd #4385 (#4924) --- xCAT-client/bin/genimage | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/xCAT-client/bin/genimage b/xCAT-client/bin/genimage index 1030b7ae0..ec65eb7c9 100755 --- a/xCAT-client/bin/genimage +++ b/xCAT-client/bin/genimage @@ -116,7 +116,7 @@ if (@ARGV > 0) { } if ((!$imagename) && (!$profile) && (!$os) && (!$arch)) { - my $tmpimgs = `lsdef -t osimage -w provmethod=~'/statelite|netboot/' |cut -d' ' -f1`; + my $tmpimgs = `XCATXMLTRACE=0 XCATBYPASS=0 lsdef -t osimage -w provmethod=~'/statelite|netboot/' |cut -d' ' -f1`; if ($? == 0) { if (($tmpimgs) && ($tmpimgs !~ /^Could/)) { #Could is returned when the osimage table is empty my @images = split('\n', $tmpimgs); @@ -162,8 +162,7 @@ if ((!$imagename) && (!$profile) && (!$os) && (!$arch)) { # get the install directory -my @entries = xCAT::TableUtils->get_site_attribute("installdir"); -my $installdir = $entries[0]; +my $installdir = `XCATXMLTRACE=0 XCATBYPASS=0 lsdef -t site -o clustersite -i installdir|grep -w 'installdir'|cut -d= -f2`; chomp($installdir); # lots of error checking to make sure it exists.