remove geninitrd, use genimage --onlyinitrd instead
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14367 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
		| @@ -39,7 +39,7 @@ my $krpmver; | ||||
| my $kerneldir; | ||||
| my $mode; | ||||
| my $interactive; | ||||
|  | ||||
| my $onlyinitrd; | ||||
| #----------------------------------------------------------------------------- | ||||
|  | ||||
| =head3 print_usage   - usage message | ||||
| @@ -51,8 +51,8 @@ sub print_usage | ||||
| { | ||||
|     print "Usage:\n"; | ||||
|     print "    genimage\n\n"; | ||||
|     print '    genimage  -o <osver> [-a <arch>] -p <profile> -i <nodebootif> -n <nodenetdrivers> [-r <otherifaces>] [-k <kernelver>] [-g <krpmver>] [-m statelite] [-l rootlimitsize] [-t tmplimitsize] [--permission <permission>] [--interactive]'."\n\n"; | ||||
|     print '    genimage [-o <osver>] [-a <arch>] [-p <profile>] [-i <nodebootif>] [-n <nodenetdrivers>] [-r <otherifaces>] [-k <kernelver>] [-g <krpmver>] [-m statelite] [-l rootlimitsize] [-t tmplimitsize] [--permission <permission>] [--interactive] <imagename>'."\n\n"; | ||||
|     print '    genimage  -o <osver> [-a <arch>] -p <profile> -i <nodebootif> -n <nodenetdrivers> [--onlyinitrd]  [-r <otherifaces>] [-k <kernelver>] [-g <krpmver>] [-m statelite] [-l rootlimitsize] [-t tmplimitsize] [--permission <permission>] [--interactive]'."\n\n"; | ||||
|     print '    genimage [-o <osver>] [-a <arch>] [-p <profile>] [-i <nodebootif>] [-n <nodenetdrivers>] [--onlyinitrd]  [-r <otherifaces>] [-k <kernelver>] [-g <krpmver>] [-m statelite] [-l rootlimitsize] [-t tmplimitsize] [--permission <permission>] [--interactive] <imagename>'."\n\n"; | ||||
|     print "      --permission is used for statelite only\n"; | ||||
|     print "      -g is used for SLES only\n\n"; | ||||
|     print "      -m is used for urbuntu, debian and fedora12 only\n\n"; | ||||
| @@ -60,6 +60,7 @@ sub print_usage | ||||
|     print "    genimage\n"; | ||||
|     print "    genimage --interactive\n"; | ||||
|     print "    genimage -i eth0 -n tg3 -o sles11 -p compute\n"; | ||||
|     print "    genimage -i eth0 -n tg3 -o sles11 -p compute --onlyinitrd\n"; | ||||
|     print "    genimage -i eth0 -r eth1,eth2 -n tg3,bnx2 -o centos5.1 -p compute --interactive\n"; | ||||
|     print "    genimage -i eth0 -n tg3,bnx2 -o sles11 -p compute\n"; | ||||
|     print "    genimage -i eth0 -n igb,e1000e,e1000,bnx2,tg3 -o centos5.4 -p nfsroot --permission 777\n"; | ||||
| @@ -82,6 +83,7 @@ if (!GetOptions( | ||||
| 	 'permission=s' => \$permission, | ||||
| 	 'kerneldir=s' => \$kerneldir,  | ||||
|          'interactive' => \$interactive,   | ||||
| 	 'onlyinitrd' => \$onlyinitrd, | ||||
| 	 'h|help' => \$help, | ||||
| 	 'v|version' => \$version, | ||||
| )) { | ||||
| @@ -388,6 +390,10 @@ if ($interactive) { | ||||
|     push @arg, "--interactive"; | ||||
| } | ||||
|  | ||||
| if ($onlyinitrd) { | ||||
|     push @arg, "--onlyinitrd"; | ||||
| } | ||||
|  | ||||
| my $cmdref; | ||||
| push (@{$cmdref->{arg}}, @arg); | ||||
| $cmdref->{command}->[0] = "genimage";    | ||||
|   | ||||
| @@ -64,6 +64,7 @@ sub process_request { | ||||
|    my $permission; #the permission works only for statelite mode currently | ||||
|    my $krpmver; | ||||
|    my $interactive; | ||||
|    my $onlyinitrd; | ||||
|    my $tempfile; | ||||
|  | ||||
|    GetOptions( | ||||
| @@ -81,6 +82,7 @@ sub process_request { | ||||
|        'kerneldir=s' => \$kerneldir,    | ||||
|        'permission=s' => \$permission, | ||||
|        'interactive' => \$interactive, | ||||
|        'onlyinitrd' => \$onlyinitrd, | ||||
|        'tempfile=s' => \$tempfile, | ||||
|        ); | ||||
|  | ||||
| @@ -285,8 +287,9 @@ sub process_request { | ||||
|    if ($mode) { $cmd .= " -m $mode";} | ||||
|    if ($permission) { $cmd .= " --permission $permission"; } | ||||
|    if ($kerneldir) { $cmd .= " --kerneldir $kerneldir"; } | ||||
|    if ($interactive) { $cmd .= " --interactive" } | ||||
|     | ||||
|    if ($interactive) { $cmd .= " --interactive"; } | ||||
|    if ($onlyinitrd) { $cmd .= " --onlyinitrd"; }    | ||||
|  | ||||
|    if ($srcdir) { $cmd .= " --srcdir $srcdir";} | ||||
|    if ($pkglist) { $cmd .= " --pkglist $pkglist";} | ||||
|    if ($srcdir_otherpkgs) { $cmd .= " --otherpkgdir $srcdir_otherpkgs"; } | ||||
|   | ||||
| @@ -28,6 +28,8 @@ my $pathtofiles=dirname($0); | ||||
| my $fullpath=realpath($pathtofiles); | ||||
| my $name = basename($0); | ||||
| my $onlyinitrd=0; | ||||
|  | ||||
| #that this method of calling genimage is no longer used | ||||
| if ($name =~ /geninitrd/) { | ||||
|    $onlyinitrd=1; | ||||
| } | ||||
| @@ -81,6 +83,7 @@ GetOptions( | ||||
|    'postinstall=s' => \$postinstall_filename,  #internal flag | ||||
|    'rootimgdir=s' => \$destdir,   #internal flag | ||||
|    'interactive' =>\$prompt,  | ||||
|    'onlyinitrd' =>\$onlyinitrd,  | ||||
| ); | ||||
|  | ||||
| if (@ARGV > 0) { | ||||
|   | ||||
| @@ -33,6 +33,7 @@ my $pathtofiles=dirname($0); | ||||
| my $fullpath=realpath($pathtofiles); | ||||
| my $name = basename($0); | ||||
| my $onlyinitrd=0; | ||||
| #that this method of calling genimage is no longer used | ||||
| if ($name =~ /geninitrd/) { | ||||
|    $onlyinitrd=1; | ||||
| } | ||||
| @@ -85,6 +86,7 @@ GetOptions( | ||||
|    'postinstall=s' => \$postinstall_filename,  #internal flag | ||||
|    'rootimgdir=s' => \$destdir,   #internal flag | ||||
|    'interactive' =>\$prompt,  | ||||
|    'onlyinitrd' =>\$onlyinitrd, | ||||
| ); | ||||
|  | ||||
| if (@ARGV > 0) { | ||||
|   | ||||
| @@ -36,6 +36,7 @@ my $pathtofiles=dirname($0); | ||||
| my $fullpath=realpath($pathtofiles); | ||||
| my $name = basename($0); | ||||
| my $onlyinitrd=0; | ||||
| #that this method of calling genimage is no longer used | ||||
| if ($name =~ /geninitrd/) { | ||||
|    $onlyinitrd=1; | ||||
| } | ||||
| @@ -86,6 +87,7 @@ GetOptions( | ||||
|    'postinstall=s' => \$postinstall_filename,  #internal flag | ||||
|    'rootimgdir=s' => \$destdir,   #internal flag | ||||
|    'interactive' =>\$prompt,  | ||||
|    'onlyinitrd' =>\$onlyinitrd,  | ||||
| ); | ||||
|  | ||||
| if (@ARGV > 0) { | ||||
|   | ||||
| @@ -34,6 +34,7 @@ my $pathtofiles=dirname($0); | ||||
| my $fullpath=realpath($pathtofiles); | ||||
| my $name = basename($0); | ||||
| my $onlyinitrd=0; | ||||
| #that this method of calling genimage is no longer used | ||||
| if ($name =~ /geninitrd/) { | ||||
|    $onlyinitrd=1; | ||||
| } | ||||
| @@ -102,6 +103,7 @@ GetOptions( | ||||
|    'postinstall=s' => \$postinstall_filename,  #internal flag | ||||
|    'rootimgdir=s' => \$destdir,   #internal flag | ||||
|    'interactive' =>\$prompt,  | ||||
|    'onlyinitrd' =>\$onlyinitrd, | ||||
|  ); | ||||
|  | ||||
| if (@ARGV > 0) { | ||||
|   | ||||
| @@ -28,6 +28,7 @@ my $pathtofiles=dirname($0); | ||||
| my $fullpath=realpath($pathtofiles); | ||||
| my $name = basename($0); | ||||
| my $onlyinitrd=0; | ||||
| #that this method of calling genimage is no longer used | ||||
| if ($name =~ /geninitrd/) { | ||||
|    $onlyinitrd=1; | ||||
| } | ||||
| @@ -81,6 +82,7 @@ GetOptions( | ||||
|    'postinstall=s' => \$postinstall_filename,  #internal flag | ||||
|    'rootimgdir=s' => \$destdir,   #internal flag | ||||
|    'interactive' =>\$prompt,  | ||||
|    'onlyinitrd' =>\$onlyinitrd, | ||||
| ); | ||||
|  | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user