mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-06-22 14:05:32 +00:00
Merge pull request #6150 from robin2008/6145
Avoid noisy warning message on rh8 for makegocons
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