All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit 960e20b0 authored by Leigh B Stoller's avatar Leigh B Stoller

Get rid of wrap in html <pre>, back to plain text. Use cat -v to

convert control chars for display.
parent bf77e242
#!/usr/bin/perl -wT
#
# Copyright (c) 2005-2015 University of Utah and the Flux Group.
# Copyright (c) 2005-2016 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -184,13 +184,6 @@ else {
$logname = "$logdir/${node_id}.log";
}
if ($linecount) {
$cmd = "tail -". $linecount
}
else {
$cmd = "cat";
}
#
# Run an ssh command in a child process, protected by an alarm to
# ensure that the ssh is not hung up forever if the machine is in
......@@ -217,7 +210,14 @@ if ($syspid) {
#
# Now we want to ssh over and cat the file.
#
if ($linecount) {
$cmd = "tail -${linecount} $logname | cat -v";
}
else {
$cmd = "cat -v $logname";
}
$UID = 0;
system("$SSH -host $tipserver $cmd $logname");
system("$SSH -host $tipserver $cmd");
$UID = $SAVEUID;
exit(($? == 0 ? 0 : 1));
<?php
#
# Copyright (c) 2005-2015 University of Utah and the Flux Group.
# Copyright (c) 2005-2016 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -111,12 +111,11 @@ if (! $fp) {
USERERROR("Spew console log failed!", 1);
}
echo "<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />
<title>Console log for $node_id</title>
</head>
<body><pre>\n";
header("Content-Type: text/plain; charset=us-ascii");
header("X-Content-Type-Options: nosniff");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
flush();
while (!feof($fp)) {
$string = fgets($fp, 1024);
......@@ -125,6 +124,5 @@ while (!feof($fp)) {
}
pclose($fp);
$fp = 0;
echo "</pre></body></html>\n";
?>
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