Commit 3ca85c09 authored by Leigh Stoller's avatar Leigh Stoller

Hook in working genelists to experiment swapin/swapout, and to

mkacct and rmacct.
parent 943fc088
......@@ -23,6 +23,7 @@ my $GROUPADD= "/usr/sbin/pw groupadd";
my $USERADD = "/usr/sbin/pw useradd";
my $USERMOD = "/usr/sbin/pw usermod";
my $CHPASS = "/usr/bin/chpass";
my $GENELISTS = "$TB/sbin/genelists";
my $user;
my @db_row;
......@@ -104,7 +105,14 @@ if ($UID && !TBAdmin($UID)) {
}
#
# Get the user info (the the user being created).
# Run genelists to update the email lists. This is a convenient
# spot to do this. Errors are non-fatal; the testbed list will
# will find out about problems via email from genelists.
#
system("$GENELISTS");
#
# Get the user info (the user being created).
#
$query_result =
DBQueryFatal("select usr_pswd,unix_uid,usr_name,usr_email ".
......
......@@ -20,6 +20,7 @@ my $HOMEDIR = "/users";
my $SSH = "$TB/bin/sshtb";
my $CONTROL = "users.emulab.net";
my $USERDEL = "/usr/sbin/pw userdel";
my $GENELISTS = "$TB/sbin/genelists";
my $user;
my $query_result;
......@@ -99,6 +100,13 @@ if ($UID && !TBAdmin($UID)) {
}
}
#
# Run genelists to update the email lists. This is a convenient
# spot to do this. Errors are non-fatal; the testbed list will
# will find out about problems via email from genelists.
#
system("$GENELISTS");
#
# Note hardwired control node.
#
......
......@@ -184,6 +184,14 @@ if (&tbs_exec("named_setup")) {
#
}
&tbs_out("Setting up email lists.\n");
if (&tbs_exec("genelists")) {
&tbs_out("WARNING: Failed to update email lists.\n");
#
# This is a non-fatal error.
#
}
&tbs_out("Marking as running.\n");
if (! $dbh->do("UPDATE experiments set state=\"active\"" .
" where pid=\"$pid\" and eid=\"$eid\"")) {
......
......@@ -117,13 +117,21 @@ if (&tbs_exec("nfree $pid $eid")) {
if (! $TESTMODE) {
&tbs_out("Resetting mountpoints\n");
if (&tbs_exec("exports_setup")) {
&tbs_out("Failed to setup mountpoints.\n");
&tbs_out("Failed to reset mountpoints.\n");
$errors=1;
}
&tbs_out("Resetting named maps.\n");
if (&tbs_exec("named_setup")) {
&tbs_out("Failed to add node names to named map.\n");
&tbs_out("Failed to reset named map.\n");
#
# This is a non-fatal error.
#
}
&tbs_out("Resetting email lists.\n");
if (&tbs_exec("genelists")) {
&tbs_out("Failed to reset email lists.\n");
#
# This is a non-fatal error.
#
......
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