mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-10-31 11:22:27 +00:00 
			
		
		
		
	add verbose mode
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5927 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
		| @@ -47,6 +47,10 @@ foreach my $table (@output) | ||||
|     if ($::RUNCMD_RC != 0) | ||||
|     {    # error | ||||
|         xCAT::MsgUtils->message("E", "Error running $cmd, @errout\n"); | ||||
|     } else { | ||||
|       if ($::DUMPVERBOSE) { | ||||
|         xCAT::MsgUtils->message("I", "Dumping $table\n"); | ||||
|       } | ||||
|     } | ||||
|  | ||||
| } | ||||
| @@ -64,7 +68,8 @@ exit $rc; | ||||
| sub parse_args | ||||
| { | ||||
|     my $msg; | ||||
|     my $usagemsg; | ||||
|     my  $usagemsg = | ||||
|           " dumpxCATdb -h \n dumpxCATdb -v \n dumpxCATdb [-V] [-p] [path to dump directory]\n"; | ||||
|     Getopt::Long::Configure("posix_default"); | ||||
|     Getopt::Long::Configure("no_gnu_compat"); | ||||
|     Getopt::Long::Configure("bundling"); | ||||
| @@ -72,20 +77,17 @@ sub parse_args | ||||
|         !GetOptions( | ||||
|             'p|path=s'  => \$::PATH, | ||||
|             'h|help'    => \$::HELP, | ||||
|             'V|verbose'    => \$::DUMPVERBOSE, | ||||
|             'v|version' => \$::VERSION | ||||
|  | ||||
|         ) | ||||
|       ) | ||||
|     { | ||||
|         $usagemsg = | ||||
|           " dumpxCATdb -h \n dumpxCATdb -v \n dumpxCATdb [-p] [path to dump directory]\n"; | ||||
|         xCAT::MsgUtils->message("E", $usagemsg); | ||||
|         exit 1; | ||||
|     } | ||||
|     if ($::HELP) | ||||
|     { | ||||
|         $usagemsg = | ||||
|           " dumpxCATdb -h \n dumpxCATdb -v \n dumpxCATdb [-p] [path to dump directory]\n"; | ||||
|         xCAT::MsgUtils->message("I", $usagemsg); | ||||
|         exit 0; | ||||
|     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user