lilalo

changeset 85:3f92cd706473

* Исправлена ошибка с неверной очисткой XML-файла
с lablog'ом, при выполнении в пакетном режиме.
Он очищался, перед записью команд, а не надо было.
В результате терялась информация о сессиях.

Теперь очистка выполняется в самом самом начале
author devi
date Sat Feb 25 08:22:20 2006 +0200 (2006-02-25)
parents 2cb912bff2ea
children 3058ada85a58
files l3-agent l3config.pm
line diff
     1.1 --- a/l3-agent	Sat Feb 25 08:02:25 2006 +0200
     1.2 +++ b/l3-agent	Sat Feb 25 08:22:20 2006 +0200
     1.3 @@ -614,9 +614,7 @@
     1.4  sub print_command_lines
     1.5  {
     1.6      my $output_filename=$_[0];
     1.7 -    my $mode = ">";
     1.8 -    $mode =">>" if $Config{mode} eq "daemon";
     1.9 -    open(OUT, $mode, $output_filename)
    1.10 +    open(OUT, ">>", $output_filename)
    1.11          or die "Can't open $output_filename for writing\n";
    1.12  
    1.13  
    1.14 @@ -832,6 +830,10 @@
    1.15  #    результат выполнения в результирующий файл.
    1.16  #    После этого завершить работу.
    1.17  
    1.18 +# Очистим кэш-файл, если он существовал
    1.19 +        if (open (CACHE, ">", $Config{"cache"})) {
    1.20 +            close(CACHE);
    1.21 +        };
    1.22          for my $lab_log (split (/\s+/, $Config{"diffs"} || $Config{"input"})) {
    1.23              load_diff_files($lab_log);
    1.24          }
     2.1 --- a/l3config.pm	Sat Feb 25 08:02:25 2006 +0200
     2.2 +++ b/l3config.pm	Sat Feb 25 08:22:20 2006 +0200
     2.3 @@ -76,12 +76,12 @@
     2.4      "files_keywords"    => "linux file",
     2.5  
     2.6      comment_width       => "300",
     2.7 -    note_width      => "500",
     2.8 -    time_width      => "6em",
     2.9 +    note_width          => "500",
    2.10 +    time_width          => "6em",
    2.11  
    2.12 -    "mode"          => "daemon",        # daemon | normal
    2.13 +    "mode"              => "daemon",        # daemon | normal
    2.14      "daemon_sleep_interval" => "10",
    2.15 -    "detach"        => "yes",
    2.16 +    "detach"            => "yes",
    2.17      "agent_pidfile"     => "$ENV{HOME}/.lilalo/l3-agent.pid",
    2.18  
    2.19      "backend_address"   => "192.168.15.254",
    2.20 @@ -89,53 +89,53 @@
    2.21      "backend_pidfile"   => "/tmp/l3-backend.pid",
    2.22      "backend_datafile"  => "/var/lilalo/lablogs-xml/backend.xml",
    2.23  
    2.24 -    "l3-agent"      => "l3-agent", 
    2.25 +    "l3-agent"          => "l3-agent", 
    2.26      "l3-backend"        => "l3-backend", 
    2.27  
    2.28      "course-name"       => "", 
    2.29      "course-code"       => "", 
    2.30 -    "course-date"       => 
    2.31 +    "course-date"       => "",
    2.32      "course-center"     => "", 
    2.33      "course-trainer"    => "", 
    2.34      "course-student"    => "", 
    2.35  
    2.36 -    "filter"        => "",
    2.37 +    "filter"            => "",
    2.38  #lm
    2.39      "show_host"         => "no",
    2.40  
    2.41  # Вспомогательные программы
    2.42  #"l3-report"    => "./lm-report",
    2.43 -    "l3-report"     => "./l3-report",
    2.44 +    "l3-report"         => "./l3-report",
    2.45  
    2.46  # Каталоги
    2.47      "path_lilalo"       => "/var/lilalo/",
    2.48      "path_classes"      => "/var/lilalo/classes/",
    2.49      "path_lablogs"      => "/var/lilalo/lablogs/",
    2.50      "courses_path"      => "/var/lilalo/courses/",
    2.51 -    "outpath"       => "/var/lilalo/out/",
    2.52 -    "path_web"      => "/var/www/l3",   # Путь к web-отчётам
    2.53 +    "outpath"           => "/var/lilalo/out/",
    2.54 +    "path_web"          => "/var/www/l3",   # Путь к web-отчётам
    2.55      "path_share"        => "./share/",      # Путь к web-отчётам
    2.56  
    2.57  # Файлы
    2.58 -    "runfile"       => "lm.run", 
    2.59 -    "logfile"       => "lm.log", 
    2.60 +    "runfile"           => "lm.run", 
    2.61 +    "logfile"           => "lm.log", 
    2.62  
    2.63 -    "class"         => "class",         # Имя файла класса
    2.64 +    "class"             => "class",         # Имя файла класса
    2.65      "class_suffix"      => ".xml",      # Cуффикс файла класса
    2.66 -    "classfile"     => "",
    2.67 +    "classfile"         => "",
    2.68  
    2.69 -    "sshkey"        => "$ENV{HOME}/.ssh/id_dsa.pub",
    2.70 -    "lmssh"         => "./lm-ssh",
    2.71 -    "lminstall"     => "./lm-install",
    2.72 -    "ssh_user"      => "r",
    2.73 +    "sshkey"            => "$ENV{HOME}/.ssh/id_dsa.pub",
    2.74 +    "lmssh"             => "./lm-ssh",
    2.75 +    "lminstall"         => "./lm-install",
    2.76 +    "ssh_user"          => "r",
    2.77  
    2.78 -    "l3scripts"     => "l3scripts",
    2.79 +    "l3scripts"         => "l3scripts",
    2.80  
    2.81  
    2.82      "cgi_path_info"     => "",
    2.83 -    "cgi2file"      => "",
    2.84 +    "cgi2file"          => "",
    2.85  
    2.86 -    "year"      =>  "2006",
    2.87 +    "year"              =>  "2006",
    2.88  );
    2.89  
    2.90  sub read_config_file