# HG changeset patch # User devi # Date 1140848540 -7200 # Node ID 3f92cd706473d03f80abcf9befba3e431a36e85d # Parent 2cb912bff2ea265549efce8f94770550b68c9015 * Исправлена ошибка с неверной очисткой XML-файла с lablog'ом, при выполнении в пакетном режиме. Он очищался, перед записью команд, а не надо было. В результате терялась информация о сессиях. Теперь очистка выполняется в самом самом начале diff -r 2cb912bff2ea -r 3f92cd706473 l3-agent --- a/l3-agent Sat Feb 25 08:02:25 2006 +0200 +++ b/l3-agent Sat Feb 25 08:22:20 2006 +0200 @@ -614,9 +614,7 @@ sub print_command_lines { my $output_filename=$_[0]; - my $mode = ">"; - $mode =">>" if $Config{mode} eq "daemon"; - open(OUT, $mode, $output_filename) + open(OUT, ">>", $output_filename) or die "Can't open $output_filename for writing\n"; @@ -832,6 +830,10 @@ # результат выполнения в результирующий файл. # После этого завершить работу. +# Очистим кэш-файл, если он существовал + if (open (CACHE, ">", $Config{"cache"})) { + close(CACHE); + }; for my $lab_log (split (/\s+/, $Config{"diffs"} || $Config{"input"})) { load_diff_files($lab_log); } diff -r 2cb912bff2ea -r 3f92cd706473 l3config.pm --- a/l3config.pm Sat Feb 25 08:02:25 2006 +0200 +++ b/l3config.pm Sat Feb 25 08:22:20 2006 +0200 @@ -76,12 +76,12 @@ "files_keywords" => "linux file", comment_width => "300", - note_width => "500", - time_width => "6em", + note_width => "500", + time_width => "6em", - "mode" => "daemon", # daemon | normal + "mode" => "daemon", # daemon | normal "daemon_sleep_interval" => "10", - "detach" => "yes", + "detach" => "yes", "agent_pidfile" => "$ENV{HOME}/.lilalo/l3-agent.pid", "backend_address" => "192.168.15.254", @@ -89,53 +89,53 @@ "backend_pidfile" => "/tmp/l3-backend.pid", "backend_datafile" => "/var/lilalo/lablogs-xml/backend.xml", - "l3-agent" => "l3-agent", + "l3-agent" => "l3-agent", "l3-backend" => "l3-backend", "course-name" => "", "course-code" => "", - "course-date" => + "course-date" => "", "course-center" => "", "course-trainer" => "", "course-student" => "", - "filter" => "", + "filter" => "", #lm "show_host" => "no", # Вспомогательные программы #"l3-report" => "./lm-report", - "l3-report" => "./l3-report", + "l3-report" => "./l3-report", # Каталоги "path_lilalo" => "/var/lilalo/", "path_classes" => "/var/lilalo/classes/", "path_lablogs" => "/var/lilalo/lablogs/", "courses_path" => "/var/lilalo/courses/", - "outpath" => "/var/lilalo/out/", - "path_web" => "/var/www/l3", # Путь к web-отчётам + "outpath" => "/var/lilalo/out/", + "path_web" => "/var/www/l3", # Путь к web-отчётам "path_share" => "./share/", # Путь к web-отчётам # Файлы - "runfile" => "lm.run", - "logfile" => "lm.log", + "runfile" => "lm.run", + "logfile" => "lm.log", - "class" => "class", # Имя файла класса + "class" => "class", # Имя файла класса "class_suffix" => ".xml", # Cуффикс файла класса - "classfile" => "", + "classfile" => "", - "sshkey" => "$ENV{HOME}/.ssh/id_dsa.pub", - "lmssh" => "./lm-ssh", - "lminstall" => "./lm-install", - "ssh_user" => "r", + "sshkey" => "$ENV{HOME}/.ssh/id_dsa.pub", + "lmssh" => "./lm-ssh", + "lminstall" => "./lm-install", + "ssh_user" => "r", - "l3scripts" => "l3scripts", + "l3scripts" => "l3scripts", "cgi_path_info" => "", - "cgi2file" => "", + "cgi2file" => "", - "year" => "2006", + "year" => "2006", ); sub read_config_file