some minor modification related to updatenode --security
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5568 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
d4f537e501
commit
6399a3f417
@ -191,9 +191,9 @@ my %usage = (
|
||||
"Usage:
|
||||
updatenode [-h|--help|-v|--version]
|
||||
or
|
||||
updatenode <noderange> [-V|--verbose] [--security] [-s|--sn]
|
||||
updatenode <noderange> [-V|--verbose] [-k|--security] [-s|--sn]
|
||||
or
|
||||
updatenode <noderange> [-V|--verbose] [--security] [--user]
|
||||
updatenode <noderange> [-V|--verbose] [-k|--security] [--user]
|
||||
[--devicetype]
|
||||
or
|
||||
updatenode <noderange> [-V|--verbose] [-F|--sync] [-S|--sw]
|
||||
@ -202,8 +202,10 @@ my %usage = (
|
||||
or
|
||||
updatenode <noderange> [-V|--verbose] [script1,script2,...]
|
||||
<noderange> is a list of nodes or groups.
|
||||
[--security] update the security keys and certificates for the target nodes
|
||||
[--security] [--user] [--devicetype] update the ssh keys for specific device
|
||||
[-k|--security] update the security keys and certificates for the
|
||||
target nodes
|
||||
[-k|--security] [--user] [--devicetype] update the ssh keys for
|
||||
specific device
|
||||
[-F|--sync] Perform File Syncing.
|
||||
[-S|--sw] Perform Software Maintenance.
|
||||
[-P|--scripts] Execute postscripts listed in the postscripts table or
|
||||
|
@ -49,7 +49,9 @@ if ($arg !~ /^-/) {
|
||||
$arg = join(',',@tempnr);
|
||||
$cmdref->{noderange}->[0]=$arg;
|
||||
} else {
|
||||
push @{$cmdref->{arg}}, $arg;
|
||||
print "The noderange should be the first argument.\n";
|
||||
&updatenode_usage();
|
||||
exit 1;
|
||||
}
|
||||
|
||||
push (@{$cmdref->{arg}}, @ARGV);
|
||||
@ -69,7 +71,7 @@ if (
|
||||
'S|sw' => \$::SWMAINTENANCE,
|
||||
's|sn' => \$::SETSERVER,
|
||||
'P|scripts:s' => \$::RERUNPS,
|
||||
'security' => \$::SECURITY,
|
||||
'k|security' => \$::SECURITY,
|
||||
'user=s' => \$::USER,
|
||||
'devicetype=s' => \$::DEVICETYPE,
|
||||
)
|
||||
|
@ -180,7 +180,7 @@ sub preprocess_updatenode
|
||||
'S|sw' => \$::SWMAINTENANCE,
|
||||
's|sn' => \$::SETSERVER,
|
||||
'P|scripts:s' => \$::RERUNPS,
|
||||
'security' => \$::SECURITY,
|
||||
'k|security' => \$::SECURITY,
|
||||
'user=s' => \$::USER,
|
||||
'devicetype=s' => \$::DEVICETYPE,
|
||||
)
|
||||
@ -652,14 +652,17 @@ sub updatenode
|
||||
Getopt::Long::Configure("no_pass_through");
|
||||
if (
|
||||
!GetOptions(
|
||||
'c|cmdlineonly' => \$::CMDLINE,
|
||||
'h|help' => \$::HELP,
|
||||
'v|version' => \$::VERSION,
|
||||
'V|verbose' => \$::VERBOSE,
|
||||
'F|sync' => \$::FILESYNC,
|
||||
's|sn' => \$::SETSERVER,
|
||||
'S|sw' => \$::SWMAINTENANCE,
|
||||
'P|scripts:s' => \$::RERUNPS
|
||||
'c|cmdlineonly' => \$::CMDLINE,
|
||||
'h|help' => \$::HELP,
|
||||
'v|version' => \$::VERSION,
|
||||
'V|verbose' => \$::VERBOSE,
|
||||
'F|sync' => \$::FILESYNC,
|
||||
'S|sw' => \$::SWMAINTENANCE,
|
||||
's|sn' => \$::SETSERVER,
|
||||
'P|scripts:s' => \$::RERUNPS,
|
||||
'k|security' => \$::SECURITY,
|
||||
'user=s' => \$::USER,
|
||||
'devicetype=s' => \$::DEVICETYPE,
|
||||
)
|
||||
)
|
||||
{
|
||||
@ -1015,7 +1018,7 @@ sub updatenode
|
||||
} elsif ($output !~ /Running postscript|Error loading module/) {
|
||||
push @{$rsp->{data}}, "$output";
|
||||
}
|
||||
} else {
|
||||
} elsif ($output !~ /Error loading module/) {
|
||||
push @{$rsp->{data}}, "$output";
|
||||
}
|
||||
}
|
||||
@ -1091,7 +1094,7 @@ sub updatenode
|
||||
} elsif ($output !~ /Running postscript|Error loading module/) {
|
||||
push @{$rsp->{data}}, $output;
|
||||
}
|
||||
} else {
|
||||
} elsif ($output !~ /Error loading module/) {
|
||||
push @{$rsp->{data}}, "$output";
|
||||
}
|
||||
}
|
||||
|
@ -100,7 +100,7 @@ fi
|
||||
rm /tmp/ssh_rsa_hostkey
|
||||
|
||||
if [ -r /etc/xCATSN ] ; then
|
||||
mkdir /etc/xcat/hostkeys
|
||||
mkdir -p /etc/xcat/hostkeys
|
||||
cp /etc/ssh/ssh* /etc/xcat/hostkeys/.
|
||||
fi
|
||||
|
||||
|
@ -3,6 +3,8 @@
|
||||
#####################################################
|
||||
#
|
||||
# Generic xCAT post script for diskless nodes
|
||||
# The syntax of this script
|
||||
# xcatdsklspost {mode} {-m|-M} [postscirpts]
|
||||
# This script is called in the following different palces:
|
||||
# updatenode -P ... --> xcatdsklspost 1 -m/-M ...
|
||||
# updatenode -S --> xcatdsklspost 2 -m/-M otherpkgs
|
||||
@ -44,8 +46,9 @@ download_postscripts()
|
||||
# parse the arguments
|
||||
ARGNUM=$#;
|
||||
if [ -z $1 ]; then
|
||||
NODE_DEPLOYMENT=1
|
||||
NODE_DEPLOYMENT=1
|
||||
else
|
||||
NODE_DEPLOYMENT=0
|
||||
case $1 in
|
||||
1|2|5)
|
||||
MODE=$1
|
||||
|
Loading…
x
Reference in New Issue
Block a user