-Change noderange to make , lower precedence operator than @

-Have xCAT metapackage ensure the expected permissions on ssh public key on the postscripts section.


git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1884 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2008-07-17 13:44:56 +00:00
parent 058cceb692
commit cde3cf828e
2 changed files with 9 additions and 4 deletions

View File

@ -43,6 +43,10 @@ sub expandatom {
$recurselevel++;
return noderange($atom);
}
if ($atom =~ /@/) {
$recurselevel++;
return noderange($atom);
}
# Try to match groups?
foreach($nodelist->getAllAttribs('node','groups')) {
@ -212,8 +216,6 @@ sub retain_cache { #A semi private operation to be used *ONLY* in the interestin
sub noderange {
$missingnodes=[];
#We for now just do left to right operations
#TODO: Parentheses... A parenthetical group to the right of an intersection makes the obvious
#answer not work
my $range=shift;
my $verify = (scalar(@_) == 1 ? shift : 1);
unless ($nodelist) {
@ -225,8 +227,10 @@ sub noderange {
my %nodes = ();
my %delnodes = ();
my $op = ",";
#my @elems = split(/(,(?![^[]*?])|@)/,$range); #, or @ but ignore , within []
my @elems = split(/(,(?![^[]*?])(?![^\(]*?\))|@(?![^\(]*?\)))/,$range); # comma or @ but ignore comma within []
my @elems = split(/(,(?![^[]*?])(?![^\(]*?\)))/,$range); # commas outside of [] or ()
if (scalar(@elems)==1) {
@elems = split(/(@(?![^\(]*?\)))/,$range); # only split on @ when no , are present (inner recursion)
}
while (my $atom = shift @elems) {
if ($atom =~ /^-/) { # if this is an exclusion, strip off the minus, but remember it

View File

@ -131,6 +131,7 @@ if [ "$1" = "1" ]; then #Only if installing for the fist time..
fi
mkdir -p /install/postscripts/_ssh
cp /root/.ssh/id_rsa.pub /install/postscripts/_ssh/authorized_keys
chmod 644 /install/postscripts/_ssh/authorized_keys
mkdir -p /var/log/consoles
if ! grep /tftpboot /etc/exports; then