mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-11-04 05:12:30 +00:00 
			
		
		
		
	only try to stop named if restartneeded=1
because on linux, if the named is already stopped, when we tried to stop named, the return code is 0 with a warning message; while on AIX, if the named is already stopped, when we tried to stop named, the return code is 1, it's different with Linux.
This commit is contained in:
		@@ -576,20 +576,13 @@ sub process_request {
 | 
			
		||||
 | 
			
		||||
            if (xCAT::Utils->isAIX())
 | 
			
		||||
            {
 | 
			
		||||
                #try to stop named
 | 
			
		||||
                my $cmd = "/usr/bin/stopsrc -s $service";
 | 
			
		||||
                my @output=xCAT::Utils->runcmd($cmd, 0);
 | 
			
		||||
                my $outp = join('', @output);
 | 
			
		||||
                if ($::RUNCMD_RC != 0)
 | 
			
		||||
                {
 | 
			
		||||
                    my $rsp = {};
 | 
			
		||||
                    $rsp->{data}->[0] = "Command failed: $cmd. Error message: $outp.\n";
 | 
			
		||||
                    xCAT::MsgUtils->message("E", $rsp, $callback);
 | 
			
		||||
                    return;
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                $cmd = "/usr/bin/startsrc -s $service";
 | 
			
		||||
                @output=xCAT::Utils->runcmd($cmd, 0);
 | 
			
		||||
                $outp = join('', @output);
 | 
			
		||||
                my $outp = join('', @output);
 | 
			
		||||
                if ($::RUNCMD_RC != 0)
 | 
			
		||||
                {
 | 
			
		||||
                    my $rsp = {};
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user