Add note about location of code.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@518 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
061eb10d56
commit
3448e9c7d3
@ -1,5 +1,4 @@
|
||||
#!/usr/bin/perl
|
||||
# !/usr/bin/env perl
|
||||
# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html
|
||||
BEGIN
|
||||
{
|
||||
@ -20,11 +19,14 @@ my $bname = basename($0);
|
||||
#
|
||||
# Build hash and submit request
|
||||
#
|
||||
# Handles: mkdef, chdef, lsdef, rmdef commands
|
||||
# Handles: mkdef, chdef, lsdef, rmdef, and xcat2nim commands
|
||||
#
|
||||
# Note: The subroutines that implement these commands
|
||||
# are in /usr/lib/xcat/plugins/DBobjectdefs.pm
|
||||
# on the xCAT management node
|
||||
# are, for the most part, in:
|
||||
# /opt/xcat/lib/perl/xCAT_plugin/DBobjectdefs.pm
|
||||
# /opt/xcat/lib/perl/xCAT_plugin/xcat2nim.pm
|
||||
# /opt/xcat/lib/perl/xCAT/DBobjUtils.pm
|
||||
# -on the xCAT management node
|
||||
#
|
||||
#########################################
|
||||
|
||||
@ -60,35 +62,21 @@ foreach (@ARGV)
|
||||
push(@{$cmdref->{arg}}, $_);
|
||||
}
|
||||
|
||||
# Is it necessary to pass the node range through the client-server path ??
|
||||
#
|
||||
# !!!!!
|
||||
#
|
||||
# BUT - also want to pass in a list of object definitions that are
|
||||
# not noderanges
|
||||
#
|
||||
#
|
||||
# In any case - this doesn't work for mkdef & chdef because we may be
|
||||
# creating the node definition for the first time
|
||||
#
|
||||
#if (!($bname =~ /mkdef/))
|
||||
if (0)
|
||||
{
|
||||
|
||||
#
|
||||
# We need to see if a noderange was provided on the command line
|
||||
# - the command line could be flags(options) -> noderange -> attr=val pairs
|
||||
# - the noderange is used by xCAT remote access support infrastructure
|
||||
# so we need to set it now
|
||||
#
|
||||
#
|
||||
# We need to see if a noderange was provided on the command line
|
||||
# - the command line could be flags(options) -> noderange -> attr=val pairs
|
||||
# - the noderange is used by xCAT remote access support infrastructure
|
||||
# so we need to set it now
|
||||
#
|
||||
|
||||
use Getopt::Long;
|
||||
use Getopt::Long;
|
||||
|
||||
# Allows opts to be grouped (e.g. -avx)
|
||||
Getopt::Long::Configure("bundling");
|
||||
# Allows opts to be grouped (e.g. -avx)
|
||||
Getopt::Long::Configure("bundling");
|
||||
|
||||
# parse the options
|
||||
if (
|
||||
# parse the options
|
||||
if (
|
||||
!GetOptions(
|
||||
'all|a' => \$::opt_a,
|
||||
'dynamic|d' => \$::opt_d,
|
||||
@ -98,33 +86,33 @@ if (0)
|
||||
'long|l' => \$::opt_l,
|
||||
'm|minus' => \$::opt_m,
|
||||
'o=s' => \$::opt_o,
|
||||
'r|relace' => \$::opt_r,
|
||||
'r|replace' => \$::opt_r,
|
||||
't=s' => \$::opt_t,
|
||||
'update|u' => \$::opt_u,
|
||||
'verbose|V' => \$::opt_V,
|
||||
'version|v' => \$::opt_v,
|
||||
'w=s' => \$::opt_w,
|
||||
'x|xml' => \$::opt_x,
|
||||
'z|stanza' => \$::opt_z
|
||||
)
|
||||
)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
)
|
||||
)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
# a node range would be the next arg - but not if it contains an "=" sign
|
||||
# - then it would be an attr=val operand
|
||||
my $arg = shift(@ARGV);
|
||||
if (!($arg =~ /=/))
|
||||
{
|
||||
# only set the noderange if it was a type of node or the type
|
||||
# wasn't specified.
|
||||
if (!$::opt_t || ($::opt_t eq 'node')) {
|
||||
$cmdref->{noderange}->[0] = $arg;
|
||||
}
|
||||
|
||||
}
|
||||
# a node range would be the next arg - but not if it contains an "=" sign
|
||||
# - then it would be an attr=val operand
|
||||
my $arg = shift(@ARGV);
|
||||
if (!($arg =~ /=/))
|
||||
{
|
||||
# only set the noderange if it was a type of node or the type
|
||||
# wasn't specified.
|
||||
if (!$::opt_t || ($::opt_t eq 'node')) {
|
||||
$cmdref->{noderange}->[0] = $arg;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
xCAT::Client::submit_request($cmdref,\&xCAT::Client::handle_response);
|
||||
exit $xCAT::Client::EXITCODE;
|
||||
|
Loading…
Reference in New Issue
Block a user