Hi all,
I have been looking for this feature for a long time. Not sure why
it's not included. The following patch allows to add a new variable to
be able to use in postscripts called GROUPS, and in essence, grabs the
groups that the node is in as defined in the nodelist table.
Previously I was SSH'ing back to MN to get these values. If in other
peoples experiences if there's a better way of doing this, then I
would like to hear your ideas.
Index: Postage.pm
===================================================================
--- Postage.pm (revision 12725)
+++ Postage.pm (working copy)
@@ -359,6 +359,15 @@
push @scriptd, "export MACADDRESS\n";
}
+ my $nodelisttab = xCAT::Table->new("nodelist");
+ my $tmp = $nodelisttab->getNodeAttribs($node, ['groups']);
+ if (defined($tmp) && ($tmp))
+ {
+ my $groups = $tmp->{groups};
+ push @scriptd, "GROUPS='" . $groups . "'\n";
+ push @scriptd, "export GROUPS\n";
+ }
+
#get vlan related items
my $vlan;
my $swtab = xCAT::Table->new("switch", -create => 0);
--
Arif Ali
catch me on freenode IRC, username: arif-ali
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
xCAT-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xcat-user