Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
54e22b39
Commit
54e22b39
authored
May 29, 2012
by
Leigh B Stoller
Browse files
Insert optional local head file, to allow for local additions that
might otherwise get lost.
parent
8d783c48
Changes
1
Hide whitespace changes
Inline
Side-by-side
tbsetup/named_setup.in
View file @
54e22b39
...
...
@@ -368,6 +368,7 @@ sub assemble_zonefile($) {
my
$mapfileback
=
"
$mapfile
.backup
";
my
$mapfilehead
=
"
$mapfile
.head
";
my
$mapfiletail
=
"
$mapfile
.tail
";
my
$mapfilefrag
=
"
$mapfile
.local
";
#
# Concat the head and tail files to create the new map.
...
...
@@ -410,11 +411,23 @@ sub assemble_zonefile($) {
close
(
MAPHEAD
);
close
(
MAP
);
# Give local admin a place to add static stuff to the head.
if
(
-
e
$mapfilefrag
)
{
system
("
echo '' >>
$mapfile
");
system
("
echo ';' >>
$mapfile
");
system
("
echo '; This is a local fragment;
$mapfilefrag
' >>
$mapfile
");
system
("
echo ';' >>
$mapfile
");
system
("
cat
$mapfilefrag
>>
$mapfile
")
==
0
or
fatal
("
Failed to concat
$mapfilefrag
to
$mapfile
\n
");
system
("
echo '; End of local fragment;
$mapfilefrag
' >>
$mapfile
");
system
("
echo '' >>
$mapfile
");
}
#
# Now the tail of the map.
#
system
("
cat
$mapfiletail
>>
$mapfile
")
==
0
or
fatal
("
Failed to concat
$mapfiletail
to
$mapfile
\n
");
fatal
("
Failed to concat
$mapfiletail
to
$mapfile
\n
");
}
my
$laddrs
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment