make gateway as an optional attribute for getmacs -D and rnetboot
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8527 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
		@@ -187,7 +187,11 @@ sub do_rnetboot {
 | 
			
		||||
        #######################################
 | 
			
		||||
        # Network specified
 | 
			
		||||
        #######################################
 | 
			
		||||
        $cmd.= " -s auto -d auto -m $mac -S $opt->{S} -G $opt->{G} -C $opt->{C} -N $opt->{N}";
 | 
			
		||||
        $cmd.= " -s auto -d auto -m $mac -S $opt->{S} -C $opt->{C} -N $opt->{N}";
 | 
			
		||||
        if (defined($opt->{G}))
 | 
			
		||||
        {
 | 
			
		||||
            $cmd.= " -G $opt->{G}";
 | 
			
		||||
        }
 | 
			
		||||
  
 | 
			
		||||
 | 
			
		||||
        #######################################
 | 
			
		||||
 
 | 
			
		||||
@@ -888,17 +888,15 @@ sub resolve_netwk {
 | 
			
		||||
            next;
 | 
			
		||||
        }
 | 
			
		||||
        my $gateway = $nethash{$_}{gateway};
 | 
			
		||||
        if ( !defined( $gateway )) {
 | 
			
		||||
            my $msg = sprintf("$_: $errmsg{NO_ATTR}","gateway","networks");
 | 
			
		||||
            send_msg( $request, 1, $msg );
 | 
			
		||||
            next;
 | 
			
		||||
        my $gateway_ip;
 | 
			
		||||
        if ( defined( $gateway )) {
 | 
			
		||||
            $ip = xCAT::Utils::toIP( $gateway );
 | 
			
		||||
            if ( @$ip[0] != 0 ) {
 | 
			
		||||
                send_msg( $request, 1, "$_: Cannot resolve '$gateway'" );
 | 
			
		||||
                next;  
 | 
			
		||||
            }
 | 
			
		||||
            $gateway_ip = @$ip[1];
 | 
			
		||||
        }
 | 
			
		||||
        $ip = xCAT::Utils::toIP( $gateway );
 | 
			
		||||
        if ( @$ip[0] != 0 ) {
 | 
			
		||||
            send_msg( $request, 1, "$_: Cannot resolve '$gateway'" );
 | 
			
		||||
            next;  
 | 
			
		||||
        }
 | 
			
		||||
        my $gateway_ip = @$ip[1];
 | 
			
		||||
 | 
			
		||||
        my $netmask = $nethash{$_}{mask};
 | 
			
		||||
        if ( !defined( $netmask )) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user