mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-10-30 19:02:27 +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:
		| @@ -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; | ||||
|           } | ||||
|     } | ||||
|  | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user