mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-30 17:46:38 +00:00
Ignore the disable when not installed, not using package checking as we use a fake package there
This commit is contained in:
parent
2386723ddd
commit
0ff9bc0be5
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user