Commit 7aa9c4ba authored by Leigh Stoller's avatar Leigh Stoller

Some silly changes for ssh upgrade. ssh-keygen args are slightly

different. Also for protocol 1 in sshtb. Some error condition
fixes in mkacct as well; the error log was not getting email properly,
and I'm not really sure why.
parent 39bf6ae1
......@@ -998,6 +998,7 @@ if test "${with_SSH_ARGS+set}" = set; then
else
SSH_ARGS="-q -o \"BatchMode yes\" -o \"StrictHostKeyChecking no\""
SSH_ARGS="$SSH_ARGS -o \"Protocol 1\""
fi
......@@ -1228,7 +1229,7 @@ outfiles="$outfiles Makeconf GNUmakefile \
tbsetup/webmkproj tbsetup/mkproj tbsetup/libtestbed.pm \
tbsetup/portstats tbsetup/vnode_setup tbsetup/staticroutes \
tbsetup/console_setup.proxy tbsetup/exports_setup.proxy \
tbsetup/checkports tbsetup/webidlecheck \
tbsetup/checkports tbsetup/webidlecheck tbsetup/webnodereboot \
tip/GNUmakefile \
tmcd/GNUmakefile tmcd/freebsd/GNUmakefile tmcd/linux/GNUmakefile \
tmcd/ron/GNUmakefile \
......
......@@ -155,6 +155,7 @@ AC_ARG_WITH(SSH_ARGS,
SSH_ARGS="$withval"
],[
SSH_ARGS="-q -o \"BatchMode yes\" -o \"StrictHostKeyChecking no\""
SSH_ARGS="$SSH_ARGS -o \"Protocol 1\""
])
AC_SUBST(SSH_ARGS)
......@@ -300,7 +301,7 @@ outfiles="$outfiles Makeconf GNUmakefile \
tbsetup/webmkproj tbsetup/mkproj tbsetup/libtestbed.pm \
tbsetup/portstats tbsetup/vnode_setup tbsetup/staticroutes \
tbsetup/console_setup.proxy tbsetup/exports_setup.proxy \
tbsetup/checkports tbsetup/webidlecheck \
tbsetup/checkports tbsetup/webidlecheck tbsetup/webnodereboot \
tip/GNUmakefile \
tmcd/GNUmakefile tmcd/freebsd/GNUmakefile tmcd/linux/GNUmakefile \
tmcd/ron/GNUmakefile \
......
......@@ -368,18 +368,28 @@ if ($auditmode) {
exit(0);
sub fatal {
local($msg) = $_[0];
my($msg) = @_;
my $flist = ();
if (defined($logname)) {
$flist = ($logname);
}
SENDMAIL($TBOPS, "mkacct $user Failed", $msg, $TBOPS, undef,
(defined($logname) ? ($logname) : ()));
die("$0: $msg\n");
SENDMAIL($TBOPS, "mkacct $user Failed", $msg, $TBOPS, undef, $flist);
if (defined($logname)) {
unlink($logname);
}
die("*** $0:\n".
" $msg\n");
}
sub AUDIT($)
{
my($msg) = @_;
SENDMAIL($TBLOGS, "mkacct $user Complete", $msg, $TBOPS, undef, $logname);
SENDMAIL($TBLOGS, "mkacct $user Complete", $msg,
$TBOPS, undef, ($logname));
}
#
......@@ -417,7 +427,7 @@ sub FirstTime()
if ($mypid) {
waitpid($mypid, 0);
if ($?) {
exit($? >> 0);
fatal("Failed to do firsttime user stuff!");
}
return;
}
......@@ -427,9 +437,13 @@ sub FirstTime()
TBdbfork();
#
# Below here, use die() instead of fatal().
#
if ($dossh) {
if (system("$KEYGEN -P '' -f $SSHDIR/identity")) {
fatal("Failure in ssh-keygen");
if (system("$KEYGEN -t rsa1 -P '' -f $SSHDIR/identity")) {
die("Failure in ssh-keygen");
}
#
......@@ -460,10 +474,10 @@ sub FirstTime()
print "Setting up .forward file for $user.\n";
if (system("echo \"$user_email\" > $HOMEDIR/$user/.forward")) {
fatal("Could not create $HOMEDIR/$user/.forward");
die("Could not create $HOMEDIR/$user/.forward");
}
chmod(0644, "$HOMEDIR/$user/.forward") or
fatal("Could not chmod $HOMEDIR/$user/.forward");
die("Could not chmod $HOMEDIR/$user/.forward");
}
#
......
#!/usr/bin/perl -w
use English;
#
# This gets invoked from the Web interface. Simply a wrapper for experiment
# termination.
#
#
# Configure variables
#
my $TB = "@prefix@";
#
# Run the real thing, and never return.
#
exec "$TB/bin/node_reboot", @ARGV;
die("*** $0:\n".
" Could not exec program: $!");
......@@ -33,6 +33,9 @@ if ($#ARGV != 4) {
# The status of the test.
$status = "";
# A counter.
$counter = 0;
sub doexit {
if ($status eq "") {
$status = "PASS";
......@@ -53,6 +56,7 @@ $pid = $::pid;
$test = $::test;
$dir = $::dir;
$dbh = $::dbh;
$db = $::db;
sub tb_prerun {
my ($cmd,$exitcode) = @_;
......@@ -63,6 +67,10 @@ sub tb_prerun {
}
close(TBEXEC);
$ecode = ($? >> 8);
# system("mysqldump --all $db > $cmd-$::counter.txt");
$::counter++;
if ($ecode != $exitcode) {
tb_fail("$cmd - Exit code $ecode, expected $exitcode");
}
......@@ -102,6 +110,10 @@ sub tb_run {
}
close(TBEXEC);
$ecode = ($? >> 8);
# system("mysqldump --all $db > $cmd-$::counter.txt");
$::counter++;
if ($ecode != $exitcode) {
tb_fail("$cmd - Exit code $ecode, expected $exitcode");
}
......
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