2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-08-21 10:40:24 +00:00

defect 3307024. In dumpxCATdb, if the directory input does not exist then create it.

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9674 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
lissav
2011-05-24 17:43:36 +00:00
parent 62f206d1a1
commit 7abed255d4

View File

@@ -121,11 +121,17 @@ sub parse_args
xCAT::MsgUtils->message("E", $msg);
exit 1;
}
if (!( -e $::PATH)) {
my $msg = " Input path must exist";
xCAT::MsgUtils->message("E", $msg);
exit 1;
}
if (!( -e $::PATH)) {
my $msg = " Creating $::PATH for database dump";
xCAT::MsgUtils->message("I", $msg);
my @output = xCAT::Utils->runcmd("mkdir -p $::PATH", 0);
if ($::RUNCMD_RC != 0)
{ # error
xCAT::MsgUtils->message("E",
"Error running mkdir -p $::PATH");
exit 1;
}
}
}