Commit 596dcdb4 authored by David Johnson's avatar David Johnson

Support per-node and per-type pxelinux template files.

parent 3e568267
......@@ -192,7 +192,14 @@ sub donode($$)
# Need to create a new version.
# XXX racy. Maybe we should do "install -C"?
#
my $nodetype = $node->type();
my $tmpfile = "$configdir/$nodeid.$PID";
if (-e "${template}.$nodeid") {
$template = "${template}.$nodeid";
}
elsif (-e "${template}.$nodetype") {
$template = "${template}.$nodetype";
}
if (open(IFD, "<$template") && open(OFD, ">$tmpfile")) {
while (<IFD>) {
s/%default%/$action/;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment