com...@warewulf.lbl.gov
unread,Jul 25, 2016, 1:41:30 PM7/25/16Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to warewul...@lbl.gov
Author: jms
Date: 2016-07-25 10:41:28 -0700 (Mon, 25 Jul 2016)
New Revision: 1996
Modified:
trunk/provision/lib/Warewulf/Provision.pm
Log:
Delete the PXELINUX key when set to 'UNDEF'... An "UNDEF" value for the key
causes all sorts of fun to be had.
Also expand the characters allowed, and move a line in the master() function
Modified: trunk/provision/lib/Warewulf/Provision.pm
===================================================================
--- trunk/provision/lib/Warewulf/Provision.pm 2016-06-20 05:30:44 UTC (rev 1995)
+++ trunk/provision/lib/Warewulf/Provision.pm 2016-07-25 17:41:28 UTC (rev 1996)
@@ -217,8 +217,15 @@
pxelinux()
{
my $self = shift;
+ my $val = shift;
+ my $name = $self->get("name");
- return $self->prop("pxelinux", qr/^([a-zA-Z0-9\.]+)$/, @_);
+ if (!defined($val) || us($val) eq "UNDEF") {
+ &dprint("Object $name del PXELINUX\n");
+ $self->del("pxelinux");
+ } else {
+ return $self->prop("pxelinux", qr/^([a-zA-Z0-9\.\/\-]+)$/, $val);
+ }
}
=item fileidadd(@fileids)
@@ -284,13 +291,12 @@
my $key = "master";
my @masters;
+ my $name = $self->get("name");
if (scalar(@_) > 1) {
if (!defined($strings[0]) || (uc($strings[0]) eq "UNDEF")) {
&dprint("Object $name del $key\n");
$self->del($key);
} else {
- my $name = $self->get("name");
-
foreach my $string (@strings) {
if ($string =~ /^(\d+\.\d+\.\d+\.\d+)$/) {
push(@masters, $1);