Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emulab-devel
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
143
Issues
143
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
emulab
emulab-devel
Commits
26e74c15
Commit
26e74c15
authored
Dec 11, 2012
by
Leigh B Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move email list switchover to last minute.
parent
88a7e38b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
78 additions
and
30 deletions
+78
-30
clientside/tmcc/common/config/rc.mkelab
clientside/tmcc/common/config/rc.mkelab
+1
-30
install/phases/ops/genirack
install/phases/ops/genirack
+77
-0
No files found.
clientside/tmcc/common/config/rc.mkelab
View file @
26e74c15
...
...
@@ -1725,36 +1725,7 @@ sub SetupOpsNode($)
closedir
(
DIR
);
foreach
my
$list
(
@lists
)
{
if
(
$emulabconfig
{"
CONFIG_GENIRACK
"})
{
my
$where
=
"
genirack-ops
\@
flux.utah.edu
";
if
(
exists
(
$emulabconfig
{"
GENIRACK_TBOPS
"}))
{
$where
=
join
("
\n
",
split
("
,
",
$emulabconfig
{"
GENIRACK_TBOPS
"}));
}
if
(
$list
eq
"
testbed-logs
"
||
$list
eq
"
testbed-audit
")
{
if
(
exists
(
$emulabconfig
{"
GENIRACK_TBLOGS
"}))
{
$where
=
join
("
\n
",
split
("
,
",
$emulabconfig
{"
GENIRACK_TBLOGS
"}));
}
else
{
$where
=
"
genirack-logs
\@
flux.utah.edu
";
}
}
elsif
(
$list
eq
"
testbed-stated
")
{
if
(
exists
(
$emulabconfig
{"
GENIRACK_TBSTATED
"}))
{
$where
=
join
("
\n
",
split
("
,
",
$emulabconfig
{"
GENIRACK_TBSTATED
"}));
}
else
{
$where
=
"
genirack-stated
\@
flux.utah.edu
";
}
}
mysystem
("
echo '
$where
' > /etc/mail/lists/
$list
");
}
else
{
mysystem
("
echo
${creator}
\@
${outer_domain}
> /etc/mail/lists/
$list
");
}
mysystem
("
echo
${creator}
\@
${outer_domain}
> /etc/mail/lists/
$list
");
}
#
...
...
install/phases/ops/genirack
View file @
26e74c15
...
...
@@ -9,6 +9,7 @@ use libinstall;
use installvars;
my $CONFIGVARS = "$PREFIX/configvars.txt";
my $PORTSRC = "http://www.emulab.net/downloads/FreeBSD-9.0-ports.tar.gz";
sub Install($$$)
{
...
...
@@ -60,6 +61,82 @@ sub Install($$$)
DeleteFileFatal($RCLOCAL);
};
#
# Need to remove the ELABINELAB flag.
#
my $OLDDEFSFILE = "$main::TOP_SRCDIR/defs-elabinelab";
my $NEWDEFSFILE = "$main::TOP_SRCDIR/defs-genirack";
Phase "elabinelab", "Removing ELABINELAB from defs file", sub {
DoneIfExists($NEWDEFSFILE);
ExecQuietFatal("cat $OLDDEFSFILE | ".
" sed -e 's/^ELABINELAB/#ELABINELAB/' ".
" > $NEWDEFSFILE");
};
#
# Build and install software without ELABINELAB defined.
#
Phase "Software", "Rebuilding and Reinstalling Software", sub {
DoneIfExists("$PREFIX/marker");
Phase "cleaning", "Cleaning (please be patient)", sub {
ExecQuietFatal("cd $TOP_OBJDIR; $GMAKE clean");
};
Phase "config", "Configuring (please be patient)", sub {
ExecQuietFatal("cd $TOP_OBJDIR; ".
" $main::TOP_SRCDIR/configure ".
" --with-TBDEFS=$NEWDEFSFILE ".
" --disable-windows");
};
Phase "installing", "Installing (please be patient)", sub {
ExecQuietFatal("cd $TOP_OBJDIR; $GMAKE opsfs-install");
};
Phase "rc.testbed", "Installing testbed RC scripts", sub {
ExecQuietFatal("$GMAKE -C $TOP_OBJDIR/rc.d control-install");
};
CreateFile("$PREFIX/marker", "genirack install marker");
};
#
# Reset the mailing lists. We do this late so that the target
# admins do not see a bunch of email until we are really ready.
#
Phase "emaillists", "Changing target for email lists", sub {
opendir(DIR, "/etc/mail/lists") or
PhaseFail("Cannot opendir /etc/mail/lists: $!");
my @lists = grep { $_ ne "." && $_ ne ".." } readdir(DIR);
closedir(DIR);
my @default = "genirack-ops\@flux.utah.edu";
if (exists($configvars{"GENIRACK_TBOPS"})) {
@default = split(",", $configvars{"GENIRACK_TBOPS"});
}
foreach my $list (@lists) {
my @where = @default;
my $fname = "/etc/mail/lists/$list";
DoneIfEdited($fname)
if (-e $fname);
DeleteFileFatal($fname)
if (-e $fname);
CreateFileFatal($fname, "# $list")
if (! -e $fname);
Phase "emaillist", "Changing target for $list", sub {
if ($list eq "testbed-logs" || $list eq "testbed-audit") {
@where = split(",", $configvars{"GENIRACK_TBLOGS"})
if (exists($configvars{"GENIRACK_TBLOGS"}));
}
elsif ($list eq "testbed-stated") {
@where = split(",", $configvars{"GENIRACK_TBSTATED"})
if (exists($configvars{"GENIRACK_TBSTATED"}));
}
AppendToFileFatal($fname, @where);
};
}
};
#
# Also grab the port source while close to the server.
#
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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