Commit ffb52cd0 authored by Mike Hibler's avatar Mike Hibler

More minor cleanups exposed by FBSD9 install.

Bogus param list for AddPerExperimentSwitchStack; can't have scalar args
after a list arg.

Missing mailing list TBERRORSEMAIL in defs-elabinelab. Caused redundant
"testbed-ops" addresses in /etc/aliases.

Weed out said redundant mailing list names when creating aliases during
ops-install.

named.reload script has gone away. Use rndc instead.
parent 9d0a5368
......@@ -2574,8 +2574,8 @@ sub GetPerExperimentSwitchStack($) {
#
# Add a per-experiment switch stack type, and add switches to that stack.
#
sub AddPerExperimentSwitchStack($@;$$$) {
my ($expt,@switches,$leader,$snmp_community,$min_vlan,$max_vlan) = @_;
sub AddPerExperimentSwitchStack($$$$$@) {
my ($expt,$leader,$snmp_community,$min_vlan,$max_vlan,@switches) = @_;
my $scomm = $snmp_community;
my $stack_id = GetPerExperimentSwitchStackName($expt);
......
......@@ -16,6 +16,7 @@ TBTESTSUITEEMAIL=testbed-testsuite@changeme
TBAUTOMAILEMAIL=testbed-automail@changeme
TBACTIVEARCHIVE=testbed-active-users-archive@changeme
TBUSERSARCHIVE=testbed-users-archive@changeme
TBERRORSEMAIL=testbed-errors@changeme
TBCOOKIESUFFIX=changeme
JAILIPBASE=172.17.0.0
JAILIPMASK=255.240.0.0
......
......@@ -10,9 +10,18 @@ sub Install($$$)
my ($server, $isupdate, $impotent) = @_;
my @LOCAL_HOSTS = ($OURDOMAIN,$BOSSNODE,$USERNODE,$FSNODE);
my @LOCAL_MAILING_LISTS = grep(/$OURDOMAIN$/, @MAILING_LISTS);
my @MAILING_LIST_NAMES = map { /^([\w-]+)\@/ } @LOCAL_MAILING_LISTS;
# covert to list names and remove duplicates
my @MAILING_LIST_NAMES = ();
my %gotit = ();
foreach my $name (@LOCAL_MAILING_LISTS) {
if ($name =~ /^([\w-]+)\@/) {
push(@MAILING_LIST_NAMES, $1)
if (!exists($gotit{$1}));
$gotit{$1} = 1;
}
}
Phase "sendmail","Configuring sendmail", sub {
if ($isupdate) {
Phase "localhosts", "Updating $LOCAL_HOSTNAMES", sub {
......
......@@ -260,16 +260,23 @@ closedir DIR;
#
# Get the nameserver to reload the zone files.
# This is better than HUPing the nameserver directly. Notet that we look
# This is better than HUPing the nameserver directly. Note that we look
# for a local port of named first.
#
if ($restart_named) {
if (-x "/usr/local/sbin/rndc") {
system("/usr/local/sbin/rndc reload > /dev/null") == 0 or
fatal("/usr/local/sbin/rndc reload failed!\n");
} else {
system("named.reload > /dev/null") == 0 or
fatal("named.reload failed!\n");
}
# XXX named.reload went away circa FBSD 9
elsif (-x "/usr/sbin/named.reload") {
system("/usr/sbin/named.reload > /dev/null") == 0 or
fatal("/usr/sbin/named.reload failed!\n");
}
# try standard rndc
else {
system("/usr/sbin/rndc reload > /dev/null") == 0 or
fatal("/usr/sbin/rndc failed!\n");
}
}
TBScriptUnlock();
......
......@@ -1023,7 +1023,8 @@ sub doSwapin($) {
if (($type > MODIFY && @expswitches)
|| ($type == MODIFY && (!defined($perexpstack) && @expswitches))) {
print STDERR "Creating per-experiment switch stack.\n";
AddPerExperimentSwitchStack($experiment,@expswitches);
AddPerExperimentSwitchStack($experiment,undef,undef,undef,undef,
@expswitches);
$perexpstack = GetPerExperimentSwitchStackName($experiment);
}
elsif ($type == MODIFY && defined($perexpstack)
......
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