mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-10-31 11:22:27 +00:00 
			
		
		
		
	add more than one nameservers in /etc/resolv.conf.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7637 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
		| @@ -3961,24 +3961,26 @@ sub mk_resolv_conf_file | ||||
|         my $nameserverstr; | ||||
|         foreach (split /,/, $nameservers) | ||||
|         { | ||||
|             $nameserverstr .= "nameserver $_\n"; | ||||
|         } | ||||
|         chomp($nameserverstr); | ||||
|         $cmd = qq~echo $nameserverstr >> $fullname~; | ||||
|         if ($::VERBOSE) | ||||
|         { | ||||
|             my $rsp; | ||||
|             push @{$rsp->{data}}, "Add $nameserverstr into $fullname"; | ||||
|             xCAT::MsgUtils->message("I", $rsp, $callback); | ||||
|         } | ||||
|         $output = | ||||
|           xCAT::InstUtils->xcmd($callback, $subreq, "xdsh", $nimprime, $cmd, 0); | ||||
|         if ($::RUNCMD_RC != 0) | ||||
|         { | ||||
|             my $rsp; | ||||
|             push @{$rsp->{data}}, "Could not add nameservers into $fullname"; | ||||
|             xCAT::MsgUtils->message("E", $rsp, $callback); | ||||
|             return 1; | ||||
|             $nameserverstr = "nameserver $_"; | ||||
|             chomp($nameserverstr); | ||||
|  | ||||
|             $cmd = qq~echo $nameserverstr >> $fullname~; | ||||
|             if ($::VERBOSE) | ||||
|             { | ||||
|                 my $rsp; | ||||
|                 push @{$rsp->{data}}, "Add $nameserverstr into $fullname"; | ||||
|                 xCAT::MsgUtils->message("I", $rsp, $callback); | ||||
|             } | ||||
|  | ||||
|             $output = | ||||
|               xCAT::InstUtils->xcmd($callback, $subreq, "xdsh", $nimprime, $cmd, 0); | ||||
|             if ($::RUNCMD_RC != 0) | ||||
|             { | ||||
|                 my $rsp; | ||||
|                 push @{$rsp->{data}}, "Could not add nameservers into $fullname"; | ||||
|                 xCAT::MsgUtils->message("E", $rsp, $callback); | ||||
|                 return 1; | ||||
|             }    | ||||
|         } | ||||
|     } | ||||
|     else | ||||
|   | ||||
		Reference in New Issue
	
	Block a user