Commit 7aa9c4ba authored by Leigh B. Stoller's avatar Leigh B. 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 ...@@ -998,6 +998,7 @@ if test "${with_SSH_ARGS+set}" = set; then
else else
SSH_ARGS="-q -o \"BatchMode yes\" -o \"StrictHostKeyChecking no\"" SSH_ARGS="-q -o \"BatchMode yes\" -o \"StrictHostKeyChecking no\""
SSH_ARGS="$SSH_ARGS -o \"Protocol 1\""
fi fi
...@@ -1228,7 +1229,7 @@ outfiles="$outfiles Makeconf GNUmakefile \ ...@@ -1228,7 +1229,7 @@ outfiles="$outfiles Makeconf GNUmakefile \
tbsetup/webmkproj tbsetup/mkproj tbsetup/libtestbed.pm \ tbsetup/webmkproj tbsetup/mkproj tbsetup/libtestbed.pm \
tbsetup/portstats tbsetup/vnode_setup tbsetup/staticroutes \ tbsetup/portstats tbsetup/vnode_setup tbsetup/staticroutes \
tbsetup/console_setup.proxy tbsetup/exports_setup.proxy \ tbsetup/console_setup.proxy tbsetup/exports_setup.proxy \
tbsetup/checkports tbsetup/webidlecheck \ tbsetup/checkports tbsetup/webidlecheck tbsetup/webnodereboot \
tip/GNUmakefile \ tip/GNUmakefile \
tmcd/GNUmakefile tmcd/freebsd/GNUmakefile tmcd/linux/GNUmakefile \ tmcd/GNUmakefile tmcd/freebsd/GNUmakefile tmcd/linux/GNUmakefile \
tmcd/ron/GNUmakefile \ tmcd/ron/GNUmakefile \
......
...@@ -155,6 +155,7 @@ AC_ARG_WITH(SSH_ARGS, ...@@ -155,6 +155,7 @@ AC_ARG_WITH(SSH_ARGS,
SSH_ARGS="$withval" SSH_ARGS="$withval"
],[ ],[
SSH_ARGS="-q -o \"BatchMode yes\" -o \"StrictHostKeyChecking no\"" SSH_ARGS="-q -o \"BatchMode yes\" -o \"StrictHostKeyChecking no\""
SSH_ARGS="$SSH_ARGS -o \"Protocol 1\""
]) ])
AC_SUBST(SSH_ARGS) AC_SUBST(SSH_ARGS)
...@@ -300,7 +301,7 @@ outfiles="$outfiles Makeconf GNUmakefile \ ...@@ -300,7 +301,7 @@ outfiles="$outfiles Makeconf GNUmakefile \
tbsetup/webmkproj tbsetup/mkproj tbsetup/libtestbed.pm \ tbsetup/webmkproj tbsetup/mkproj tbsetup/libtestbed.pm \
tbsetup/portstats tbsetup/vnode_setup tbsetup/staticroutes \ tbsetup/portstats tbsetup/vnode_setup tbsetup/staticroutes \
tbsetup/console_setup.proxy tbsetup/exports_setup.proxy \ tbsetup/console_setup.proxy tbsetup/exports_setup.proxy \
tbsetup/checkports tbsetup/webidlecheck \ tbsetup/checkports tbsetup/webidlecheck tbsetup/webnodereboot \
tip/GNUmakefile \ tip/GNUmakefile \
tmcd/GNUmakefile tmcd/freebsd/GNUmakefile tmcd/linux/GNUmakefile \ tmcd/GNUmakefile tmcd/freebsd/GNUmakefile tmcd/linux/GNUmakefile \
tmcd/ron/GNUmakefile \ tmcd/ron/GNUmakefile \
......
...@@ -368,18 +368,28 @@ if ($auditmode) { ...@@ -368,18 +368,28 @@ if ($auditmode) {
exit(0); exit(0);
sub fatal { sub fatal {
local($msg) = $_[0]; my($msg) = @_;
my $flist = ();
if (defined($logname)) {
$flist = ($logname);
}
SENDMAIL($TBOPS, "mkacct $user Failed", $msg, $TBOPS, undef, SENDMAIL($TBOPS, "mkacct $user Failed", $msg, $TBOPS, undef, $flist);
(defined($logname) ? ($logname) : ()));
die("$0: $msg\n"); if (defined($logname)) {
unlink($logname);
}
die("*** $0:\n".
" $msg\n");
} }
sub AUDIT($) sub AUDIT($)
{ {
my($msg) = @_; 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() ...@@ -417,7 +427,7 @@ sub FirstTime()
if ($mypid) { if ($mypid) {
waitpid($mypid, 0); waitpid($mypid, 0);
if ($?) { if ($?) {
exit($? >> 0); fatal("Failed to do firsttime user stuff!");
} }
return; return;
} }
...@@ -427,9 +437,13 @@ sub FirstTime() ...@@ -427,9 +437,13 @@ sub FirstTime()
TBdbfork(); TBdbfork();
#
# Below here, use die() instead of fatal().
#
if ($dossh) { if ($dossh) {
if (system("$KEYGEN -P '' -f $SSHDIR/identity")) { if (system("$KEYGEN -t rsa1 -P '' -f $SSHDIR/identity")) {
fatal("Failure in ssh-keygen"); die("Failure in ssh-keygen");
} }
# #
...@@ -460,10 +474,10 @@ sub FirstTime() ...@@ -460,10 +474,10 @@ sub FirstTime()
print "Setting up .forward file for $user.\n"; print "Setting up .forward file for $user.\n";
if (system("echo \"$user_email\" > $HOMEDIR/$user/.forward")) { 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 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) { ...@@ -33,6 +33,9 @@ if ($#ARGV != 4) {
# The status of the test. # The status of the test.
$status = ""; $status = "";
# A counter.
$counter = 0;
sub doexit { sub doexit {
if ($status eq "") { if ($status eq "") {
$status = "PASS"; $status = "PASS";
...@@ -53,6 +56,7 @@ $pid = $::pid; ...@@ -53,6 +56,7 @@ $pid = $::pid;
$test = $::test; $test = $::test;
$dir = $::dir; $dir = $::dir;
$dbh = $::dbh; $dbh = $::dbh;
$db = $::db;
sub tb_prerun { sub tb_prerun {
my ($cmd,$exitcode) = @_; my ($cmd,$exitcode) = @_;
...@@ -63,6 +67,10 @@ sub tb_prerun { ...@@ -63,6 +67,10 @@ sub tb_prerun {
} }
close(TBEXEC); close(TBEXEC);
$ecode = ($? >> 8); $ecode = ($? >> 8);
# system("mysqldump --all $db > $cmd-$::counter.txt");
$::counter++;
if ($ecode != $exitcode) { if ($ecode != $exitcode) {
tb_fail("$cmd - Exit code $ecode, expected $exitcode"); tb_fail("$cmd - Exit code $ecode, expected $exitcode");
} }
...@@ -102,6 +110,10 @@ sub tb_run { ...@@ -102,6 +110,10 @@ sub tb_run {
} }
close(TBEXEC); close(TBEXEC);
$ecode = ($? >> 8); $ecode = ($? >> 8);
# system("mysqldump --all $db > $cmd-$::counter.txt");
$::counter++;
if ($ecode != $exitcode) { if ($ecode != $exitcode) {
tb_fail("$cmd - Exit code $ecode, expected $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