mirror of
				https://github.com/gravitl/netmaker.git
				synced 2025-10-31 00:17:13 +08:00 
			
		
		
		
	bug squashin
This commit is contained in:
		
							parent
							
								
									679534974b
								
							
						
					
					
						commit
						438c01d619
					
				
					 1 changed files with 6 additions and 6 deletions
				
			
		|  | @ -138,12 +138,6 @@ func CheckConfig(cliconf config.ClientConfig) error { | ||||||
| 	if newNode.IsPending == "yes" { | 	if newNode.IsPending == "yes" { | ||||||
| 		return errors.New("node is pending") | 		return errors.New("node is pending") | ||||||
| 	} | 	} | ||||||
| 	// check for interface change |  | ||||||
| 	if cfg.Node.Interface != newNode.Interface { |  | ||||||
| 		if err = DeleteInterface(cfg.Node.Interface, cfg.Node.PostDown); err != nil { |  | ||||||
| 			log.Println("could not delete old interface", cfg.Node.Interface) |  | ||||||
| 		} |  | ||||||
| 	} |  | ||||||
| 
 | 
 | ||||||
| 	actionCompleted := checkNodeActions(newNode, network, servercfg) | 	actionCompleted := checkNodeActions(newNode, network, servercfg) | ||||||
| 	if actionCompleted == models.NODE_DELETE { | 	if actionCompleted == models.NODE_DELETE { | ||||||
|  | @ -207,6 +201,12 @@ func Pull(network string, manual bool) (*models.Node, error) { | ||||||
| 		return nil, err | 		return nil, err | ||||||
| 	} | 	} | ||||||
| 	if resNode.PullChanges == "yes" || manual { | 	if resNode.PullChanges == "yes" || manual { | ||||||
|  | 		// check for interface change | ||||||
|  | 		if cfg.Node.Interface != resNode.Interface { | ||||||
|  | 			if err = DeleteInterface(cfg.Node.Interface, cfg.Node.PostDown); err != nil { | ||||||
|  | 				log.Println("could not delete old interface", cfg.Node.Interface) | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
| 		if err = config.ModConfig(&resNode); err != nil { | 		if err = config.ModConfig(&resNode); err != nil { | ||||||
| 			return nil, err | 			return nil, err | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue