lilalo

changeset 58:93e98a3fa44d

Наконец-то пофиксил неверное определение присутствия l3-agent в FreeBSD
author devi
date Sat Jan 14 00:12:41 2006 +0200 (2006-01-14)
parents 187b6636a3be
children 4d7e45bc659b
files l3-agent l3config.pm l3scripts
line diff
     1.1 --- a/l3-agent	Wed Dec 28 18:44:42 2005 +0200
     1.2 +++ b/l3-agent	Sat Jan 14 00:12:41 2006 +0200
     1.3 @@ -968,7 +968,7 @@
     1.4  				unlink $Config{agent_pidfile}
     1.5  					or die "Can't remove stale pidfile ". $Config{agent_pidfile}. " : $!";
     1.6  			}
     1.7 -			elsif ($^O eq 'freebsd' && $pid && `ps axo uid,pid,command | grep '$<.*$pid.*$Config{"l3-agent"}' 2> /dev/null`) {
     1.8 +			elsif ($^O eq 'freebsd' && $pid && `ps axo uid,pid,command | grep '$<\\s*$pid\\s*$Config{"l3-agent"}' 2> /dev/null`) {
     1.9  				print "Removing stale pidfile\n";
    1.10  				unlink $Config{agent_pidfile}
    1.11  					or die "Can't remove stale pidfile ". $Config{agent_pidfile}. " : $!";
     2.1 --- a/l3config.pm	Wed Dec 28 18:44:42 2005 +0200
     2.2 +++ b/l3config.pm	Sat Jan 14 00:12:41 2006 +0200
     2.3 @@ -14,123 +14,125 @@
     2.4  
     2.5  
     2.6  our %Config = (
     2.7 -		"skip_empty" 			=> 	"yes",
     2.8 -		"skip_interrupted" 		=>	"no",
     2.9 -		"skip_wrong" 			=>	"no",
    2.10 -		"editors"			=>	["vi", "pico", "ee", "vim", "nano"],
    2.11 -		"pagers"			=>	["more", "less", "zmore", "zless", "info", 
    2.12 -							"man", "mc", "trafshow", "screen", "cfdisk",
    2.13 -							"trafshow-bsd", "yes", "lynx", "links", "centericq"
    2.14 -							],
    2.15 -		"terminal"			=>	["mc"],
    2.16 -		"suppress_editors"		=>	"yes",
    2.17 -		"suppress_pagers"		=>	"yes",
    2.18 -		"suppress_terminal"		=>	"yes",
    2.19 +	"skip_empty"		=> "yes",
    2.20 +	"skip_interrupted"	=> "no",
    2.21 +	"skip_wrong" 		=> "no",
    2.22 +	"editors"		    => ["vi", "pico", "ee", "vim", "nano"],
    2.23 +	"pagers"		    => ["more", "less", "zmore", "zless", "info", 
    2.24 +				        "man", "mc", "trafshow", "screen", "cfdisk",
    2.25 +				        "trafshow-bsd", "yes", "lynx", "links", "centericq"
    2.26 +				        ],
    2.27 +	"terminal"		    => ["mc"],
    2.28 +	"suppress_editors"	=> "yes",
    2.29 +	"suppress_pagers"	=> "yes",
    2.30 +	"suppress_terminal"	=> "yes",
    2.31  
    2.32 -		"terminal_width"		=> 	400,
    2.33 -		"terminal_height"		=> 	100,
    2.34 -		"verbose"			=>	"yes",
    2.35 +	"terminal_width"	=> 400,
    2.36 +	"terminal_height"	=> 100,
    2.37 +	"verbose"		    => "yes",
    2.38  
    2.39 -		"head_lines"			=> 	5,
    2.40 -		"tail_lines"			=>	5,
    2.41 -		"cache_head_lines"		=> 	50,
    2.42 -		"cache_tail_lines"		=>	50,
    2.43 -		"skip_text"			=>	"...",
    2.44 -		"show_time"			=>	"yes",
    2.45 -		"show_diffs"			=>	"yes",
    2.46 -		"show_comments"			=>	"yes",
    2.47 -		"show_notes"			=>	"yes",
    2.48 +	"head_lines"		=> 5,
    2.49 +	"tail_lines"		=> 5,
    2.50 +	"cache_head_lines"	=> 50,
    2.51 +	"cache_tail_lines"	=> 50,
    2.52 +	"skip_text"		    => "...",
    2.53 +	"show_time"		    => "yes",
    2.54 +	"show_diffs"		=> "yes",
    2.55 +	"show_comments"		=> "yes",
    2.56 +	"show_notes"		=> "yes",
    2.57  
    2.58 -		"input"				=>	"$ENV{HOME}/.lilalo",
    2.59 -		"diffs"				=>	"",
    2.60 -		"input_mask"			=>	"*.script",
    2.61 -		"encoding"			=> 	"utf-8",
    2.62 +	"input"			=> "$ENV{HOME}/.lilalo",
    2.63 +	"diffs"			=> "",
    2.64 +	"input_mask"		=> "*.script",
    2.65 +	"encoding"		=> "utf-8",
    2.66  
    2.67 -		"cache"				=>	"$ENV{HOME}/.lilalo/report.xml",
    2.68 -		"cache_stat"			=>	"$ENV{HOME}/.lilalo/.report.dat",
    2.69 +	"cache"			=> "$ENV{HOME}/.lilalo/report.xml",
    2.70 +	"cache_stat"		=> "$ENV{HOME}/.lilalo/.report.dat",
    2.71  
    2.72 -		"output"			=>	"/tmp/report.html",
    2.73 -		"output_mask"			=>	"INDEX",
    2.74 -		"output_format"			=>	"html",
    2.75 -		"frontend_css"			=>	"/l3/l3.css",
    2.76 -		"frontend_google_ico"		=>	"/l3/google.ico",
    2.77 -		"frontend_linux_ico"		=>	"/l3/linux.ico",
    2.78 -		"frontend_freebsd_ico"		=>	"/l3/freebsd.ico",
    2.79 -		"frontend_opennet_ico"		=>	"/l3/opennet.ico",
    2.80 -		"frontend_local_ico"		=>	"/l3/freebsd.ico",
    2.81 +	"output"		=> "/tmp/report.html",
    2.82 +	"output_mask"		=> "INDEX",
    2.83 +	"output_format"		=> "html",
    2.84 +	"frontend_css"		=> "/l3/l3.css",
    2.85 +	"frontend_google_ico"	=> "/l3/google.ico",
    2.86 +	"frontend_linux_ico"	=> "/l3/linux.ico",
    2.87 +	"frontend_freebsd_ico"	=> "/l3/freebsd.ico",
    2.88 +	"frontend_opennet_ico"	=> "/l3/opennet.ico",
    2.89 +	"frontend_local_ico"	=> "/l3/freebsd.ico",
    2.90  
    2.91 -		"mywi_server"			=>	"127.0.0.1",
    2.92 -		"mywi_port"			=> 	"19801",
    2.93 +	"mywi_server"		=> "127.0.0.1",
    2.94 +	"mywi_port"		=> "19801",
    2.95  
    2.96 -		"stat_inactivity_interval"	=>	"1800",
    2.97 -		
    2.98 -		"signature"			=>	"#lm:",
    2.99 -		"from"				=>	"",
   2.100 -		"to"				=>	"",
   2.101 -		"lab"				=>	"",
   2.102 -		"keywords"			=>	"linux command",
   2.103 -		"files_keywords"		=>	"linux file",
   2.104 -		
   2.105 -		comment_width			=>	"300",
   2.106 -		note_width			=>	"500",
   2.107 -		time_width			=>	"60",
   2.108 -		
   2.109 -		"mode"				=>	"daemon",		# daemon | normal
   2.110 -		"daemon_sleep_interval"		=>	"1",
   2.111 -		"detach"			=>	"yes",
   2.112 -		"agent_pidfile"			=> 	"$ENV{HOME}/.lilalo/l3-agent.pid",
   2.113 +	"stat_inactivity_interval"	=>	"1800",
   2.114  
   2.115 -		"backend_address"		=>	"192.168.15.254",
   2.116 -		"backend_port"			=> 	"18030",
   2.117 -		"backend_pidfile"		=> 	"/tmp/l3-backend.pid",
   2.118 -		"backend_datafile"		=> 	"/var/lilalo/lablogs-xml/backend.xml",
   2.119 +	"signature"		=> "#lm:",
   2.120 +	"from"			=> "",
   2.121 +	"to"			=> "",
   2.122 +	"lab"			=> "",
   2.123 +	"keywords"		=> "linux command",
   2.124 +	"files_keywords"	=> "linux file",
   2.125  
   2.126 -		"l3-agent"			=>	"l3-agent", 
   2.127 -		"l3-backend"			=>	"l3-backend", 
   2.128 -		
   2.129 -		"course-name" => "", 
   2.130 -		"course-code" => "", 
   2.131 -		"course-date" => "", 
   2.132 -		"course-center" => "", 
   2.133 -		"course-trainer" => "", 
   2.134 -		"course-student" => "", 
   2.135 +	comment_width		=> "300",
   2.136 +	note_width		=> "500",
   2.137 +	time_width		=> "60",
   2.138  
   2.139 -		"filter" => "",
   2.140 -		#lm
   2.141 -		"show_host" 	=> "no",
   2.142 +	"mode"			=> "daemon",		# daemon | normal
   2.143 +	"daemon_sleep_interval"	=> "10",
   2.144 +	"detach"		=> "yes",
   2.145 +	"agent_pidfile"		=> "$ENV{HOME}/.lilalo/l3-agent.pid",
   2.146  
   2.147 -		# Вспомогательные программы
   2.148 -		#"l3-report"	=> "./lm-report",
   2.149 -		"l3-report"	=> "./l3-report",
   2.150 +	"backend_address"	=> "192.168.15.254",
   2.151 +	"backend_port"		=> "18030",
   2.152 +	"backend_pidfile"	=> "/tmp/l3-backend.pid",
   2.153 +	"backend_datafile"	=> "/var/lilalo/lablogs-xml/backend.xml",
   2.154  
   2.155 -		# Каталоги
   2.156 -		"path_lilalo" => "/var/lilalo/",
   2.157 -		"path_classes"	=> "/var/lilalo/classes/",
   2.158 -		"path_lablogs"	=> "/var/lilalo/lablogs/",
   2.159 -		"courses_path"	=> "/var/lilalo/courses/",
   2.160 -		"outpath"	=> "/var/lilalo/out/",
   2.161 -		"path_web"	=> "/var/www/l3",		# Путь к web-отчётам
   2.162 -		"path_share"	=> "./share/",		# Путь к web-отчётам
   2.163 +	"l3-agent"		=> "l3-agent", 
   2.164 +	"l3-backend"		=> "l3-backend", 
   2.165  
   2.166 -		# Файлы
   2.167 -		"runfile"	=> "lm.run", 
   2.168 -		"logfile"	=> "lm.log", 
   2.169 +	"course-name" 		=> "", 
   2.170 +	"course-code" 		=> "", 
   2.171 +	"course-date" 		=> "", 
   2.172 +	"course-center" 	=> "", 
   2.173 +	"course-trainer" 	=> "", 
   2.174 +	"course-student" 	=> "", 
   2.175  
   2.176 -		"class" 	=> "class", 				# Имя файла класса
   2.177 -		"class_suffix" 	=> ".xml", 				# Cуффикс файла класса
   2.178 -		"classfile"	=> "",
   2.179 +	"filter" 		=> "",
   2.180 +#lm
   2.181 +	"show_host" 		=> "no",
   2.182  
   2.183 -		"sshkey"	=> "$ENV{HOME}/.ssh/id_dsa.pub",
   2.184 -		"lmssh"		=> "./lm-ssh",
   2.185 -		"lminstall"	=> "./lm-install",
   2.186 -		"ssh_user"	=> "root",
   2.187 +# Вспомогательные программы
   2.188 +#"l3-report"	=> "./lm-report",
   2.189 +	"l3-report"		=> "./l3-report",
   2.190  
   2.191 -		"l3scripts"	=> "l3scripts",
   2.192 -		
   2.193 +# Каталоги
   2.194 +	"path_lilalo" 		=> "/var/lilalo/",
   2.195 +	"path_classes"		=> "/var/lilalo/classes/",
   2.196 +	"path_lablogs"		=> "/var/lilalo/lablogs/",
   2.197 +	"courses_path"		=> "/var/lilalo/courses/",
   2.198 +	"outpath"		=> "/var/lilalo/out/",
   2.199 +	"path_web"		=> "/var/www/l3",	# Путь к web-отчётам
   2.200 +	"path_share"		=> "./share/",		# Путь к web-отчётам
   2.201  
   2.202 -		"cgi_path_info" => "",
   2.203 -		"cgi2file"	=> "",
   2.204 -		);
   2.205 +# Файлы
   2.206 +	"runfile"		=> "lm.run", 
   2.207 +	"logfile"		=> "lm.log", 
   2.208 +
   2.209 +	"class" 		=> "class", 		# Имя файла класса
   2.210 +	"class_suffix" 		=> ".xml", 		# Cуффикс файла класса
   2.211 +	"classfile"		=> "",
   2.212 +
   2.213 +	"sshkey"		=> "$ENV{HOME}/.ssh/id_dsa.pub",
   2.214 +	"lmssh"			=> "./lm-ssh",
   2.215 +	"lminstall"		=> "./lm-install",
   2.216 +	"ssh_user"		=> "root",
   2.217 +
   2.218 +	"l3scripts"		=> "l3scripts",
   2.219 +
   2.220 +
   2.221 +	"cgi_path_info" 	=> "",
   2.222 +	"cgi2file"		=> "",
   2.223 +
   2.224 +    "year"      =>  "2006",
   2.225 +);
   2.226  
   2.227  sub read_config_file
   2.228  {
     3.1 --- a/l3scripts	Wed Dec 28 18:44:42 2005 +0200
     3.2 +++ b/l3scripts	Sat Jan 14 00:12:41 2006 +0200
     3.3 @@ -7,8 +7,8 @@
     3.4  
     3.5  ###install-pm
     3.6  scp PM/* $ssh_user@$host:/tmp
     3.7 -#ssh $ssh_user@$host 'cd /tmp; tar xfz Term-VT102*.gz; cd Term-VT102*[^z]; perl Makefile.PL; make ; make install'
     3.8 -ssh $ssh_user@$host 'cd /tmp; tar xfz Text-Iconv*.gz; cd Text-Iconv*[^z]; perl Makefile.PL; make ; make install'
     3.9 +ssh $ssh_user@$host 'cd /tmp; tar xfz Term-VT102*.gz; cd Term-VT102*[^z]; perl Makefile.PL; make ; make install'
    3.10 +#ssh $ssh_user@$host 'cd /tmp; tar xfz Text-Iconv*.gz; cd Text-Iconv*[^z]; perl Makefile.PL; make ; make install'
    3.11  
    3.12  ###copy-lablogs
    3.13  for i in $dirs