mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-10-31 03:12:30 +00:00 
			
		
		
		
	Ignore the disable when not installed, not using package checking as we use a fake package there
This commit is contained in:
		| @@ -503,11 +503,13 @@ sub is_goconserver_running { | ||||
| sub switch_goconserver { | ||||
|     my $callback = shift; | ||||
|     # ignore SN as it is handled by AAsn | ||||
|     if ((-x "/usr/bin/systemctl" || -x "-x /bin/systemctl") && !$isSN) { | ||||
|     if ((-x "/usr/bin/systemctl" || -x "/bin/systemctl") && !$isSN) { | ||||
|         my $cmd = "systemctl disable conserver"; | ||||
|         xCAT::Utils->runcmd($cmd, -1); | ||||
|         if ($::RUNCMD_RC != 0) { | ||||
|             xCAT::MsgUtils->warn_message("Failed to execute command: $cmd.", $callback); | ||||
|         if (-x "/usr/sbin/conserver") { | ||||
|             xCAT::Utils->runcmd($cmd, -1); | ||||
|             if ($::RUNCMD_RC != 0) { | ||||
|                 xCAT::MsgUtils->warn_message("Failed to execute command: $cmd.", $callback); | ||||
|             } | ||||
|         } | ||||
|         $cmd = "systemctl enable goconserver"; | ||||
|         xCAT::Utils->runcmd($cmd, -1); | ||||
| @@ -537,9 +539,11 @@ sub switch_conserver { | ||||
|     # ignore SN as it is handled by AAsn | ||||
|     if ((-x "/usr/bin/systemctl" || -x "-x /bin/systemctl") && !$isSN) { | ||||
|         my $cmd = "systemctl disable goconserver"; | ||||
|         xCAT::Utils->runcmd($cmd, -1); | ||||
|         if ($::RUNCMD_RC != 0) { | ||||
|             xCAT::MsgUtils->warn_message("Failed to execute command: $cmd.", $callback); | ||||
|         if (-x "/usr/bin/goconserver") { | ||||
|             xCAT::Utils->runcmd($cmd, -1); | ||||
|             if ($::RUNCMD_RC != 0) { | ||||
|                 xCAT::MsgUtils->warn_message("Failed to execute command: $cmd.", $callback); | ||||
|             } | ||||
|         } | ||||
|         $cmd = "systemctl enable conserver"; | ||||
|         xCAT::Utils->runcmd($cmd, -1); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user