# HG changeset patch # User devi # Date 1154703969 -10800 # Node ID 54fbf2041159356b3f2d4f3c9ace7e3e95cb0128 # Parent 53b890d1ae901bf3fa8d21324297fa69e8de832a l3cd diff -r 53b890d1ae90 -r 54fbf2041159 l3-cgi --- a/l3-cgi Fri Aug 04 17:41:31 2006 +0300 +++ b/l3-cgi Fri Aug 04 18:06:09 2006 +0300 @@ -117,7 +117,9 @@ else { # Вызов производится по URL $ENV{PATH_INFO} = "/".$ENV{PATH_INFO} unless $ENV{PATH_INFO} =~ m@^/@; + #my ($skip, $training, $host, $user) = split /\//,$ENV{PATH_INFO},4; my ($skip, $training, $host, $user) = split /\//,$ENV{PATH_INFO},4; + if (!$host || $host eq "index") { # Нам неизвестен курс или явно указан просмотр индекса diff -r 53b890d1ae90 -r 54fbf2041159 l3-frontend --- a/l3-frontend Fri Aug 04 17:41:31 2006 +0300 +++ b/l3-frontend Fri Aug 04 18:06:09 2006 +0300 @@ -208,7 +208,7 @@ $command =~ s/'//g; $frequency_of_command{$command}++; if (!$Commands_Description{$command}) { - $mywi_cache_for{$command} ||= mywi_client ($command) || ""; + $mywi_cache_for{$command} ||= mywi_client($command) || ""; my $mywi = join ("\n", grep(/\([18]|sh|script\)/, split(/\n/, $mywi_cache_for{$command}))); $mywi =~ s/\s+/ /; if ($mywi !~ /^\s*$/) { diff -r 53b890d1ae90 -r 54fbf2041159 l3bashrc --- a/l3bashrc Fri Aug 04 17:41:31 2006 +0300 +++ b/l3bashrc Fri Aug 04 18:06:09 2006 +0300 @@ -222,4 +222,24 @@ ) >> $L3_HOME/$L3_SESSION_ID.info } +l3 () +{ + case "$1" in + on) + echo switching on + ;; + off) + echo switcing off + ;; + cd) + echo l3cd="$2" > ~/.l3rc + ;; + pwd) + grep ^l3cd= ~/.l3rc | sed s/[^=]*=// + ;; + *) + echo /usr/local/bin/l3 + ;; + esac +} diff -r 53b890d1ae90 -r 54fbf2041159 l3scripts --- a/l3scripts Fri Aug 04 17:41:31 2006 +0300 +++ b/l3scripts Fri Aug 04 18:06:09 2006 +0300 @@ -18,6 +18,7 @@ ssh $ssh_user@$host 'user=user;grep -q l3-agent /home/${user}/.bash_profile || { echo >> /home/${user}/.bash_profile ; cat /home/${user}/.bash_profile | sed 1s/^/l3-agent\\n/ > /tmp/$$$$l3 ; mv /tmp/$$$$l3 /home/${user}/.bash_profile; chown -R ${user} /home/${user}; }' ssh $ssh_user@$host 'cd /tmp; tar xfz Term-VT102*.gz; cd Term-VT102*[^z]; perl Makefile.PL; make ; make install' ssh $ssh_user@$host 'cd /tmp; tar xfz Text-Iconv*.gz; cd Text-Iconv*[^z]; perl Makefile.PL; make ; make install' +ssh $ssh_user@$host 'echo l3cd=trainings/$course/$date/$host/root > /root/.l3rc ; echo l3cd=trainings/$course/$date/$host/user > /home/user/.l3rc' } ###copy-lablogs