2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-30 09:36:41 +00:00

using dirname function

This commit is contained in:
hu-weihua 2016-01-28 03:59:15 -05:00
parent cb0af287a5
commit f9a12dfcd9

View File

@ -51,6 +51,7 @@ my $arch = `uname -p`;
unless (($^O =~ /^aix/i) || ($os =~ /^sle[sc]10/) || (($os =~ /^rh.*5$/) && ($arch =~ /ppc64/))){
eval {require IO::Uncompress::Gunzip;}
}
use File::Basename;
use File::Path;
use Time::HiRes qw(sleep);
use Thread qw(yield);
@ -1128,9 +1129,7 @@ unless ($cmdlog_svrpid){
exit(0);
}
my @tmp = split "/",$cmdlog_logfile;
splice (@tmp, -1);
my $cmdlog_logfile_path=join("/", @tmp);
my $cmdlog_logfile_path=dirname($cmdlog_logfile);
mkpath("$cmdlog_logfile_path") unless(-d "$cmdlog_logfile_path");
unless (open ($cmdlogfile, ">>$cmdlog_logfile")) {