diff --git a/xCAT-server/share/xcat/netboot/rh/genimage b/xCAT-server/share/xcat/netboot/rh/genimage index a5800a888..e404ab895 100755 --- a/xCAT-server/share/xcat/netboot/rh/genimage +++ b/xCAT-server/share/xcat/netboot/rh/genimage @@ -487,7 +487,8 @@ unlink "/tmp/genimage.$$.yum.conf"; if (-d "$rootimg_dir/usr/share/dracut") { $dracutmode = 1; # get dracut version - my $dracutver = `rpm -R $rootimg_dir -qi dracut | grep Version | awk -F' ' '{print \$3}'`; + my $dracutver = `rpm --root $rootimg_dir -qi dracut | grep Version | awk -F' ' '{print \$3}'`; + chomp($dracutver); if ($dracutver =~ /^\d\d\d$/) { if ($dracutver >= "009") { $dracutdir = "dracut_009";