From 41a7e8ba1f23789c5cc22ac7fa8dd3083b4201e0 Mon Sep 17 00:00:00 2001 From: mellor Date: Mon, 19 May 2008 18:15:48 +0000 Subject: [PATCH] ignore service setup in plugins when XCATBYPASS is set git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1445 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server-2.0/lib/xcat/plugins/AAsn.pm | 5 +++++ xCAT-server-2.0/lib/xcat/plugins/CONSsn.pm | 5 +++++ xCAT-server-2.0/lib/xcat/plugins/DHCPsn.pm | 5 +++++ xCAT-server-2.0/lib/xcat/plugins/DNSsn.pm | 5 +++++ xCAT-server-2.0/lib/xcat/plugins/FTPsn.pm | 5 +++++ xCAT-server-2.0/lib/xcat/plugins/LDAPsn.pm | 5 +++++ xCAT-server-2.0/lib/xcat/plugins/NFSsn.pm | 5 +++++ xCAT-server-2.0/lib/xcat/plugins/NTPsn.pm | 5 +++++ xCAT-server-2.0/lib/xcat/plugins/SSHsn.pm | 5 +++++ xCAT-server-2.0/lib/xcat/plugins/TFTPsn.pm | 5 +++++ 10 files changed, 50 insertions(+) diff --git a/xCAT-server-2.0/lib/xcat/plugins/AAsn.pm b/xCAT-server-2.0/lib/xcat/plugins/AAsn.pm index dc1b911ac..3a4bc7736 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/AAsn.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/AAsn.pm @@ -31,6 +31,11 @@ Call mountInstall sub handled_commands { + # If called in XCATBYPASS mode, don't do any setup + if ($ENV{'XCATBYPASS'}) { + return 0; + } + my $rc = 0; if (xCAT::Utils->isServiceNode()) diff --git a/xCAT-server-2.0/lib/xcat/plugins/CONSsn.pm b/xCAT-server-2.0/lib/xcat/plugins/CONSsn.pm index 1b7ed56de..3d298e26a 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/CONSsn.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/CONSsn.pm @@ -33,6 +33,11 @@ Call setup_CONS sub handled_commands { + # If called in XCATBYPASS mode, don't do any setup + if ($ENV{'XCATBYPASS'}) { + return 0; + } + my $rc = 0; if (xCAT::Utils->isServiceNode()) { diff --git a/xCAT-server-2.0/lib/xcat/plugins/DHCPsn.pm b/xCAT-server-2.0/lib/xcat/plugins/DHCPsn.pm index 147689ab6..d567cd9c7 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/DHCPsn.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/DHCPsn.pm @@ -31,6 +31,11 @@ Call setup_DHCP sub handled_commands { + # If called in XCATBYPASS mode, don't do any setup + if ($ENV{'XCATBYPASS'}) { + return 0; + } + my $rc = 0; if (xCAT::Utils->isServiceNode()) { diff --git a/xCAT-server-2.0/lib/xcat/plugins/DNSsn.pm b/xCAT-server-2.0/lib/xcat/plugins/DNSsn.pm index b1ffd7ee5..c47a84371 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/DNSsn.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/DNSsn.pm @@ -29,6 +29,11 @@ Call setup_DNS sub handled_commands { + # If called in XCATBYPASS mode, don't do any setup + if ($ENV{'XCATBYPASS'}) { + return 0; + } + my $rc = 0; if (xCAT::Utils->isServiceNode()) { diff --git a/xCAT-server-2.0/lib/xcat/plugins/FTPsn.pm b/xCAT-server-2.0/lib/xcat/plugins/FTPsn.pm index c05c2dc82..6ea43d417 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/FTPsn.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/FTPsn.pm @@ -29,6 +29,11 @@ Call setup_TFTP (actually setting up atftp) sub handled_commands { + # If called in XCATBYPASS mode, don't do any setup + if ($ENV{'XCATBYPASS'}) { + return 0; + } + my $rc = 0; # setup vstftp diff --git a/xCAT-server-2.0/lib/xcat/plugins/LDAPsn.pm b/xCAT-server-2.0/lib/xcat/plugins/LDAPsn.pm index fad48843b..24aa0288f 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/LDAPsn.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/LDAPsn.pm @@ -29,6 +29,11 @@ Call setup_LDAP sub handled_commands { + # If called in XCATBYPASS mode, don't do any setup + if ($ENV{'XCATBYPASS'}) { + return 0; + } + my $rc = 0; if (xCAT::Utils->isServiceNode()) { diff --git a/xCAT-server-2.0/lib/xcat/plugins/NFSsn.pm b/xCAT-server-2.0/lib/xcat/plugins/NFSsn.pm index 84927e125..bd2229711 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/NFSsn.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/NFSsn.pm @@ -31,6 +31,11 @@ Call setup_NFS sub handled_commands { + # If called in XCATBYPASS mode, don't do any setup + if ($ENV{'XCATBYPASS'}) { + return 0; + } + my $rc = 0; if (xCAT::Utils->isServiceNode()) diff --git a/xCAT-server-2.0/lib/xcat/plugins/NTPsn.pm b/xCAT-server-2.0/lib/xcat/plugins/NTPsn.pm index 75a7aa1b7..7a75a4add 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/NTPsn.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/NTPsn.pm @@ -27,6 +27,11 @@ Call setup_NTP sub handled_commands { + # If called in XCATBYPASS mode, don't do any setup + if ($ENV{'XCATBYPASS'}) { + return 0; + } + my $rc = 0; if (xCAT::Utils->isServiceNode()) diff --git a/xCAT-server-2.0/lib/xcat/plugins/SSHsn.pm b/xCAT-server-2.0/lib/xcat/plugins/SSHsn.pm index cbc2fbb6a..9a58334fb 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/SSHsn.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/SSHsn.pm @@ -28,6 +28,11 @@ Call setup_SSH sub handled_commands { + # If called in XCATBYPASS mode, don't do any setup + if ($ENV{'XCATBYPASS'}) { + return 0; + } + my $rc = 0; if (xCAT::Utils->isServiceNode()) { diff --git a/xCAT-server-2.0/lib/xcat/plugins/TFTPsn.pm b/xCAT-server-2.0/lib/xcat/plugins/TFTPsn.pm index 0be8fd83c..c1e1b52ae 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/TFTPsn.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/TFTPsn.pm @@ -29,6 +29,11 @@ Call setup_TFTP (actually setting up atftp) sub handled_commands { + # If called in XCATBYPASS mode, don't do any setup + if ($ENV{'XCATBYPASS'}) { + return 0; + } + my $rc = 0; # setup atftp