minor fix for makeroutes
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9269 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
		| @@ -16,7 +16,7 @@ B<makeroutes> [B<-h> B<--help>|B<-v>|B<--version>] | ||||
|  | ||||
| =head1 DESCRIPTION | ||||
|  | ||||
| The B<makeroutes> command adds or deletes routes on the management node or any given nodes. The B<noderange> specifies the nodes where the routes are to be added or removed. When the I<noderange> is omitted, the action will be done on the management node. The B<-r> option specifies the name of routes. The details of the routes are defined in the B<routes> table which contians the route name, subnet, net mask and gateway. If -r option is omitted, the names of the routes found on B<noderes.routenames> for the nodes or on B<site.routenames> for the management node will be used. | ||||
| The B<makeroutes> command adds or deletes routes on the management node or any given nodes. The B<noderange> specifies the nodes where the routes are to be added or removed. When the I<noderange> is omitted, the action will be done on the management node. The B<-r> option specifies the name of routes. The details of the routes are defined in the B<routes> table which contians the route name, subnet, net mask and gateway. If -r option is omitted, the names of the routes found on B<noderes.routenames> for the nodes or on B<site.mnroutenames> for the management node will be used. | ||||
|  | ||||
| If you want the routes be automatically setup during node deployment, first put a list of route names to B<noderes.routenames> and then add I<setroute> script name to the B<postscripts.postbootscripts> for the nodes.  | ||||
|  | ||||
| @@ -36,7 +36,7 @@ Specifies to delete the given routes. If not specified, the action is to add rou | ||||
|  | ||||
| =item B<-r|--routename>   | ||||
|  | ||||
| Specifies a list of comma separated route names defined in the B<routes> table. If omitted, all routes defined in B<noderes.routenames> for nodes or B<site.routenames> for the management node will be used. | ||||
| Specifies a list of comma separated route names defined in the B<routes> table. If omitted, all routes defined in B<noderes.routenames> for nodes or B<site.mnroutenames> for the management node will be used. | ||||
|  | ||||
| =item B<-h|--help> | ||||
|  | ||||
| @@ -55,7 +55,7 @@ Command Version. | ||||
|  | ||||
| =item 1. | ||||
|  | ||||
| To add all routes from the B<site.routenames> to the os route table for the management node. | ||||
| To add all routes from the B<site.mnroutenames> to the os route table for the management node. | ||||
|  | ||||
|  makeroutes | ||||
|  | ||||
|   | ||||
| @@ -354,7 +354,7 @@ sub process_makeroutes { | ||||
| 	    } | ||||
| 	} | ||||
| 	else { #this is mn, get the routes from the site table | ||||
| 	    my @mnroutes = xCAT::Utils->get_site_attribute("routenames"); | ||||
| 	    my @mnroutes = xCAT::Utils->get_site_attribute("mnroutenames"); | ||||
| 	    if ($mnroutes[0]) { | ||||
| 		my @a=split(',', $mnroutes[0]); | ||||
| 		my @badroutes=(); | ||||
| @@ -369,16 +369,16 @@ sub process_makeroutes { | ||||
| 		    my $badroutes_s=join(',', @badroutes); | ||||
| 		    my $rsp={}; | ||||
| 		    if (@badroutes==1) { | ||||
| 			$rsp->{error}->[0]= "The route $badroutes_s is not defined in the routes table. Please check site.routenames for the management node."; | ||||
| 			$rsp->{error}->[0]= "The route $badroutes_s is not defined in the routes table. Please check site.mnroutenames for the management node."; | ||||
| 		    } else { | ||||
| 			$rsp->{error}->[0]= "The routes $badroutes_s are not defined in the routes table. Please check site.routenames for the management node."; | ||||
| 			$rsp->{error}->[0]= "The routes $badroutes_s are not defined in the routes table. Please check site.mnroutenames for the management node."; | ||||
| 		    } | ||||
| 		    $callback->($rsp); | ||||
| 		    return 1; | ||||
| 		} | ||||
| 	    } else { | ||||
| 		my $rsp={}; | ||||
| 		$rsp->{data}->[0]= "No routes defined in the site.routnames for the management node."; | ||||
| 		$rsp->{data}->[0]= "No routes defined in the site.mnroutnames for the management node."; | ||||
| 		$callback->($rsp); | ||||
| 		return 1; | ||||
| 	    } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user