mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-10-31 11:22:27 +00:00 
			
		
		
		
	for defect 3251763 and 3236751,
one is for manpage of imgcapture; the other is for the output of imgcapture. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9195 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
		| @@ -4,8 +4,7 @@ B<imgcapture> - Captures an image from a Linux diskful node and create a diskles | ||||
|  | ||||
| =head1 SYNOPSIS | ||||
|  | ||||
| B<imgcapture> node [B<-p>|B<--profile> I<profile>] [B<-i> I<nodebootif>] [B<-n> I<nodenetdrivers>] [B<-V>|B<--verbose>] | ||||
|  | ||||
| B<imgcapture> node [B<-p>|B<--profile> I<profile>] [B<-o>|B<--osimage> I<osimage>] [B<-i> I<nodebootif>] [B<-n> I<nodenetdrivers>] [B<-V>|B<--verbose>] | ||||
| B<imgcapture> [B<-h> | B<--help>] | [B<-v> | B<--version>] | ||||
|  | ||||
| =head1 DESCRIPTION | ||||
| @@ -28,7 +27,11 @@ After the B<imgcapture> command returns without any errors, you can customize th | ||||
|  | ||||
| =item B<-p|--profile> I<profile>  | ||||
|  | ||||
| assign I<profile> as the profile of the image to be created. | ||||
| Assign I<profile> as the profile of the image to be created. | ||||
|  | ||||
| =item B<-o|--osimage> I<osimage> | ||||
|  | ||||
| Assign the pre-defined I<osimage> object. The attributes of I<osimage> will be used to capture and prepare the root image. | ||||
|  | ||||
| =item B<-i> I<nodebootif> | ||||
|  | ||||
| @@ -80,17 +83,20 @@ Verbose output. | ||||
|  | ||||
| B<node1> is one diskful Linux node, which is managed by xCAT. | ||||
|  | ||||
| 1. In order to create the image, run the following command: | ||||
| 1. In order to capture and prepare the root image, run the following command: | ||||
|  | ||||
| imgcapture node1 | ||||
|  | ||||
| 2. In order to create the image with B<hpc> as profile, run the command: | ||||
| 2. In order to capture and prepare the root image with B<hpc> as profile, run the command: | ||||
|  | ||||
| imgcapture node1 -p hpc | ||||
|  | ||||
| 3. Create the image: its profile is B<hpc>, and the network interface the diskless node will boot over is B<eth0>, the driver modules for this network interface is B<e1000e>. | ||||
| 3. In order to capture and prepare the root image: its profile is B<hpc>, and the network interface the diskless node will boot over is B<eth0>, the driver modules for this network interface is B<e1000e>. | ||||
|  | ||||
| imgcapture node1 -p hpc -i eth0 -n e1000e | ||||
|  | ||||
| 4. There's one pre-defined I<osimage>. In order to capture and prepare the root image for I<osimage>, run the command: | ||||
| imgcapture node1 -o osimage | ||||
|   | ||||
| =head1 FILES | ||||
|  | ||||
|   | ||||
| @@ -344,7 +344,16 @@ sub imgcapture { | ||||
|             $rsp->{data}->[0] = qq{"The genimage command is: $cmd"}; | ||||
|             xCAT::MsgUtils->message("D", $rsp, $callback); | ||||
|         } | ||||
|         xCAT::Utils->runcmd($cmd); | ||||
|         my @cmdoutput = xCAT::Utils->runcmd($cmd, 0); | ||||
|         if($::RUNCMD_RC) { | ||||
|             my $rsp = {}; | ||||
|             foreach (@cmdoutput) { | ||||
|                 push @{$rsp->{data}}, $_; | ||||
|             } | ||||
|             xCAT::MsgUtils->message("E", $rsp, $callback); | ||||
|             unlink $xcat_imgcapture_tmpfile; | ||||
|             return; | ||||
|         } | ||||
|     } else { | ||||
|         my $rsp = {}; | ||||
|         $rsp->{data}->[0] = qq{Can't run the "genimage" command for $os}; | ||||
| @@ -353,7 +362,7 @@ sub imgcapture { | ||||
|     } | ||||
|  | ||||
|     my $rsp = {}; | ||||
|     $rsp->{data}->[0] = qq{"Done."}; | ||||
|     $rsp->{data}->[0] = qq{Done.}; | ||||
|     xCAT::MsgUtils->message("D", $rsp, $callback); | ||||
|  | ||||
|     unlink $xcat_imgcapture_tmpfile; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user