Commit ddb36886 authored by Reto Da Forno's avatar Reto Da Forno
Browse files

minor adjustments, unused option 'sshflags' removed

parent faeff38d
......@@ -124,7 +124,6 @@ user = flocklab
basedir = /home/flocklab/testmanagementserver
scheduler = /home/flocklab/testmanagementserver/flocklab_scheduler.py
archivedir = /home/flocklab/testarchive
sshflags = ;additional flags
logdir = /home/flocklab/logs ;log directory for web
tempdir = /home/flocklab/tmp
venvwrapper = /home/flocklab/tools/wrapper.sh ;activates python virtual environment (leave blank if no venv)
......
......@@ -73,7 +73,7 @@ RES=$(rsync ${RSYNCPARAMS} -i --dry-run -e 'ssh -q' webserver/ ${USER}@${HOST}:w
if [ -z "$RES" ]; then
echo "Webserver files are up to date."
else
printf "Updating webserver files..."
printf "Updating webserver files... "
rsync ${RSYNCPARAMS} -e 'ssh -q' webserver/ ${USER}@${HOST}:webserver
if [ $? -ne 0 ]; then
printf "failed to copy repository files!\n"
......
......@@ -256,7 +256,7 @@ echo '<h1>Manage Tests for '.$_SESSION['firstname'] . ' ' . $_SESSION['lastname'
<th width="35px">ID</th>
<th width="100px">Title</th>
<th width="150px">Description</th>
<th width="30px">IMG</th>
<th width="35px">IMG</th>
<th width="35px" class='qtip_show' title='State'>State</th>
<th>Start</th>
<th>End</th>
......
......@@ -39,7 +39,7 @@
// check file
$archivepath = $CONFIG['testmanagementserver']['archivedir'];
$archive =
$cmd = "ssh ".$CONFIG['testmanagementserver']['sshflags']." ".$CONFIG['testmanagementserver']['user']."@".$CONFIG['testmanagementserver']['host']." \"ls -l ".$archivepath.'/'.$testid.".tar.gz\"";
$cmd = "ssh ".$CONFIG['testmanagementserver']['user']."@".$CONFIG['testmanagementserver']['host']." \"ls -l ".$archivepath.'/'.$testid.".tar.gz\"";
exec($cmd , $output, $ret);
if ($ret > 0) {
echo json_encode(array('status'=>'error', 'output'=>'data not available'));
......@@ -58,7 +58,7 @@
echo json_encode(array('status'=>'success', 'testid'=>$testid));
exit();
}
$cmd = "ssh ".$CONFIG['testmanagementserver']['sshflags']." ".$CONFIG['testmanagementserver']['user']."@".$CONFIG['testmanagementserver']['host']." \"cat ".$archivepath.'/'.$testid.".tar.gz\"";
$cmd = "ssh ".$CONFIG['testmanagementserver']['user']."@".$CONFIG['testmanagementserver']['host']." \"cat ".$archivepath.'/'.$testid.".tar.gz\"";
$stream = popen($cmd, "r");
// Send the file to the user's browser:
header("Content-Type: application/x-gzip");
......
......@@ -481,12 +481,12 @@ class HTTP_WebDAV_Server_Filesystem extends HTTP_WebDAV_Server
if ($power) {
// pipe file from archive
$archivepath = $CONFIG['testmanagementserver']['archivedir'];
$cmd = "ssh ".$CONFIG['testmanagementserver']['sshflags']." ".$CONFIG['testmanagementserver']['user']."@".$CONFIG['testmanagementserver']['host']." \"ls ".$archivepath.'/'.$testid.".tar.gz\"";
$cmd = "ssh ".$CONFIG['testmanagementserver']['user']."@".$CONFIG['testmanagementserver']['host']." \"ls ".$archivepath.'/'.$testid.".tar.gz\"";
exec($cmd , $output, $ret);
if ($ret > 0)
return false;
// dump whole archive
$cmd = "ssh ".$CONFIG['testmanagementserver']['sshflags']." ".$CONFIG['testmanagementserver']['user']."@".$CONFIG['testmanagementserver']['host']." \"cat ".$archivepath.'/'.$testid.".tar.gz\"";
$cmd = "ssh ".$CONFIG['testmanagementserver']['user']."@".$CONFIG['testmanagementserver']['host']." \"cat ".$archivepath.'/'.$testid.".tar.gz\"";
$stream = popen($cmd, "r");
return $stream;
}
......@@ -494,13 +494,13 @@ class HTTP_WebDAV_Server_Filesystem extends HTTP_WebDAV_Server
flog("nopower");
$archivepath = $CONFIG['testmanagementserver']['archivedir'];
$split_path = $CONFIG['testmanagementserver']['toolsdir'];
$cmd = "ssh ".$CONFIG['testmanagementserver']['sshflags']." ".$CONFIG['testmanagementserver']['user']."@".$CONFIG['testmanagementserver']['host']." \"ls ".$archivepath.'/'.$testid.".tar.gz\"";
$cmd = "ssh ".$CONFIG['testmanagementserver']['user']."@".$CONFIG['testmanagementserver']['host']." \"ls ".$archivepath.'/'.$testid.".tar.gz\"";
exec($cmd , $output, $ret);
if ($ret > 0)
return false;
// dump stripped archive
flog("nopower dump");
$cmd = "ssh ".$CONFIG['testmanagementserver']['sshflags']." ".$CONFIG['testmanagementserver']['user']."@".$CONFIG['testmanagementserver']['host']." \"/bin/zcat ".$archivepath.'/'.$testid.".tar.gz | ".$split_path."/flocklab_archive_split | /usr/bin/pigz\"";
$cmd = "ssh ".$CONFIG['testmanagementserver']['user']."@".$CONFIG['testmanagementserver']['host']." \"/bin/zcat ".$archivepath.'/'.$testid.".tar.gz | ".$split_path."/flocklab_archive_split | /usr/bin/pigz\"";
flog("nopower dump ". $cmd);
$stream = popen($cmd, "r");
return $stream;
......@@ -513,7 +513,7 @@ class HTTP_WebDAV_Server_Filesystem extends HTTP_WebDAV_Server
return null;
// file exists?
$archivepath = $CONFIG['testmanagementserver']['archivedir'];
$cmd = "ssh ".$CONFIG['testmanagementserver']['sshflags']." ".$CONFIG['testmanagementserver']['user']."@".$CONFIG['testmanagementserver']['host']." \"ls -l ".$archivepath.'/'.$testid.".tar.gz\"";
$cmd = "ssh ".$CONFIG['testmanagementserver']['user']."@".$CONFIG['testmanagementserver']['host']." \"ls -l ".$archivepath.'/'.$testid.".tar.gz\"";
exec($cmd , $output, $ret);
if ($ret > 0)
return 0;
......
......@@ -32,7 +32,6 @@
<serialConf>
<obsIds>2 4 6 7 9</obsIds>
<baudrate>115200</baudrate>
<port>serial</port>
</serialConf>
<!-- GPIO Tracing Service configuration -->
......
Supports Markdown
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