# HG changeset patch # User devi # Date 1154702491 -10800 # Node ID 53b890d1ae901bf3fa8d21324297fa69e8de832a # Parent 09ed722f275994d25b7a9a23d55232dd58381e43 small changes diff -r 09ed722f2759 -r 53b890d1ae90 install --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/install Fri Aug 04 17:41:31 2006 +0300 @@ -0,0 +1,148 @@ +#!/bin/sh + +lilalo_rc=.l3rc +lilalo_home=.lilalo +url_lilalo="http://xgu.ru/lilalo" +url_l3bashrc="${url_lilalo}"/l3bashrc +url_l3agent="${url_lilalo}"/l3-agent +url_l3config="${url_lilalo}"/l3config.pm +url_perl_modules=${url_lilalo}/ +perl_modules="Term-VT102 Text-Iconv" + +wget=wget +uname -a | grep -qi bsd && wget=fetch + +normC='\033[0;39m' +whiteC='\033[1;37m' +redC='\033[0;31m' +greenC='\033[0;32m' + +hostname=`hostname` +uname -a | grep -qi freebsd || hostname=`hostname -f` + + +# Ask this variables: + +lilalo_user="devi" +lab="lilalo-installation" +install_l3bashrc_for_this_users="root ak devi" +lilalo_context="/users/${lilalo_user}/${lab}/${hostname}" + + +step() +{ + + msg="$1" + shift + printf "${whiteC}""$msg""...${normC}\n" +# eval "$@" 2>&1 | sed 's/^/|\ \ \ /' && printf "Ok\n" || printf "Failed\n" + eval "$@" 2>&1 > log 2>&1 && \ + { + cat log | sed 's/^/|\ \ \ /' + printf "${greenC}""Ok\n""${normC}" + } || \ + { + cat log | sed 's/^/|\ \ \ /' + printf "${redC}""Failed\n""${normC}" + } +} + +get_user_home() +{ + uname -a | grep -qi freebsd && pw user show "$@"| awk -F: '{print $9}' || getent passwd "$@"| awk -F: '{print $6}' +} + +install_to_users_homes() +{ + . l3bashrc + users="$@" + set -x + for user in $users + do + user_home=`get_user_home "$user"` + mkdir -p ${user_home}/${lilalo_home} + cp l3config.pm /usr/local/bin + cp l3-agent /usr/local/bin + chmod 755 /usr/local/bin/l3-agent + cp l3bashrc ${user_home}/${lilalo_home} + chown -R $user ${user_home}/${lilalo_home} + echo l3cd=${lilalo_context}/$user > ${user_home}/${lilalo_rc} + chown -R $user ${user_home}/${lilalo_rc} + done + set +x +} + +install_to_users_bashrc() +{ + users="$@" + for user in $users + do + user_home=`get_user_home "$user"` + grep -q lilalo ${user_home}/.bashrc 2> /dev/null\ + || echo ". ${user_home}/.lilalo/l3bashrc && _l3_start" >> ${user_home}/.bashrc; chown -R ${user} ${user_home}/.bashrc + done +} + +install_to_users_bash_profile() +{ + users="$@" + for user in $users + do + user_home=`get_user_home "$user"` + grep -q l3-agent ${user_home}/.bash_profile 2> /dev/null \ + || { echo >> ${user_home}/.bash_profile ; cat ${user_home}/.bash_profile | sed '1s/^/l3-agent/' > /tmp/$$$$l3 ; mv /tmp/$$$$l3 ${user_home}/.bash_profile; chown -R ${user} ${user_home}/.bash_profile; } + done +} + +show_usage() +{ + cat <>", $Config{"backend_datadir"}."/$l3cd/data.xml")) { print OUT "<$element_name>".$element.""; close(OUT); diff -r 09ed722f2759 -r 53b890d1ae90 l3-cgi-lite --- a/l3-cgi-lite Tue Jun 27 18:00:09 2006 +0300 +++ b/l3-cgi-lite Fri Aug 04 17:41:31 2006 +0300 @@ -129,7 +129,7 @@ sub path_is_correct($) { my $path = $_[0]; - return 0 if $path =~ m@/../@; + # return 0 if $path =~ m@/../@; return 0 unless $path =~ m@^[a-zA-Z0-9./\@\-]*$@; return 1; } diff -r 09ed722f2759 -r 53b890d1ae90 l3-frontend --- a/l3-frontend Tue Jun 27 18:00:09 2006 +0300 +++ b/l3-frontend Fri Aug 04 17:41:31 2006 +0300 @@ -174,7 +174,7 @@ sub mywi_client { - #return ""; + return ""; my $query = $_[0]; my $mywi; diff -r 09ed722f2759 -r 53b890d1ae90 l3.css --- a/l3.css Tue Jun 27 18:00:09 2006 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,337 +0,0 @@ -h1,h2,h3,h4 { - color: #485c9f; - padding-top: 10pt; - padding-bottom: 0pt; - margin-left: 0pt; - font-family: sans-serif; - /* border: thin solid gray; */ -} - -a { - padding-left: 3pt; - padding-right: 3pt; - text-decoration: none; -} - -a:hover { - background-color: #eeeecc; -} - -body { - padding-left: 10pt; - font-family: sans-serif; -} - -tr.table_header { - background-color : #98bcef; - font-weight: bold; - font-size: 105%; -} - -td -{ - padding-left:5pt; - padding-right:5pt; - - margin-left:0pt; - margin-right:0pt; -} - -.toc { - border: 1px solid #aaa; - background-color: #f9f9f9; - padding: 10pt; - padding-left: 0pt; - padding-right: 15pt; - font-size: 95%; -} - -.files_toc { - padding : 10pt; - columns: 50em; -} -.toc_title { - font-weight: bold; - text-align: center; -} - -.cline, .output - { - margin : 0px 0px 0px 0em; - padding : 0px 0px 0px 0px; - vertical-align : top; - /*display:inline;*/ -} - -.cline -{ font-weight : bold; } - -.wrong_cline, .wrong_root_cline, -.mistyped_cline, .mistyped_root_cline - { - /* - color : #ee7777; - */ - /* color : #aa5555; */ - } -.wrong_output, .wrong_root_output, -.mistyped_output, .mistyped_root_output - { - /* - font-size : 80%; - color : #cc6666; - */ - } - -.cblock_mistyped, -.cblock_mistyped_root - { - text-decoration : line-through; - } - -.cblock_interrupted > .output, -.cblock_interrupted_root > .output - { - color : #aaaaaa; - } - -.cblock_interrupted > .cline -.cblock_interrupted_root > .cline - { - color : #777777; - } - - -.cblock_normal_root, -.cblock_wrong_root, -.cblock_mistyped_root, -.cblock_interrupted_root, -.cblock_tab_root - { - border-left : #ff0000 solid thin; - } - -.command { - margin : 0pt 0pt 0pt 0pt; - padding : 0pt 0pt 0pt 0pt; - /*border : thin solid gray;*/ - } - -.with_hint { - background : #effdff; -} - -.without_hint { - background : #ffefef; -} - -.note { - /* - color : black; - background : #d8fcff; - margin : 12px 12px 12px 12px; - padding : 6px 6px 6px 6px; - border-style : dashed; - border-width : thin; - border-color : #a8eaff; - vertical-align : top; - */ - color : black; - background : #d8f0ff; - margin : 2px 12px 12px 12px; - padding : 6px 6px 6px 6px; - border-style : dotted; - border-width : thin; - border-color : #687cbf; - vertical-align : top; -} - -.note_title,.note_text,.note_search - { - color : black; - margin : 0px 0px 0px 0px; - padding : 0px 0px 0px 0px; - vertical-align : top; - } -.note_title { - font-size : 120%; - font-family : sans-serif; - padding-top : 2pt; - padding-bottom : 2pt; - } -.note_text { - font-family : sans-serif; - font-size : 100%; - } -.note_search { text-align : right; } - - -.diff { - color : black; - background : #fdffcd; - margin : 16px 16px 16px 16px; - padding : 6px 6px 6px 6px; - border-style : dashed; - border-width : thin; -} - -.ttychange { - color : #9a9a9a; - background : #fafafa; - margin : 0em 0px 0pt 0px; - padding : 0em 0pt 0em 0pt; - vertical-align : top; - font-family : monospace; - min-width: 5em; - position : relative; - left : 0em; - border-top : thin dotted #cccccc; - text-align : right; - font-size : 50%; -} - -.time { - color : #999999; - margin : 0px 0px 0px 0px; - padding : 2pt 5pt 0px 0px; - vertical-align : top; - font-size : 80%; - width : 5em; - float : left; -/* height : 100%; */ -/* border : thin solid gray; */ -} - -.cblock, -.cblock_normal, -.cblock_wrong, -.cblock_mistyped, -.cblock_interrupted, -.cblock_tab, -.cblock_normal_root, -.cblock_wrong_root, -.cblock_mistyped_root, -.cblock_interrupted_root, -.cblock_tab_root -{ - margin : 0px 0px 0px 0em; - padding : 0px 0px 0px 5pt; - vertical-align : top; -/* border : thin solid blue; */ -} - -.visibility_form { - position : fixed; - bottom: 10; right: 10; - z-index : 5; - color : #9a9a9a; - background : #e7e7e7; - margin : 0px 0px 0px 0px; - padding : 0px 0px 0px 0px; - vertical-align : top; - font-size : 80%; - font-family : sans-serif; -} -.visibility_form > .header { - font-weight: bold; -} -.visibility_form > .window_controls { - position : absolute; - right : 1pt; -} - -.new_commands_table { - padding : 0px 0px 0px 0px; - margin : 20px 60px 60px 20px; - background-color: #f9f9f9; -} - -.new_commands_header { - font-weight: bold; - background-color: #e9e9e9; -} - -.new_commands_caption { - font-style: italic; - background-color: #ffffff; -} - -.err_box { - color : white; - background : red; - font-weight : bold; - font-size : 70%; -} -.filename, .file_navigation { - background : #f7f7ba; - padding : 1ex; - padding-bottom: 1pt; - display : inline; -} - -.filename { - font-weight : bold; - margin : 20pt 0pt 0pt 10pt; -} - -.file_navigation { - font-weight : bold; - margin : 20pt 10pt 0pt 0pt; -} - -.filedata { - padding: 5pt 10pt 5pt 10pt; - margin: 0pt 10pt 30pt 10pt; - border-left: 2pt; - border-right: 2pt; - border-bottom: 2pt; - border-style: solid; - border-color: #f7f7ba; - background-color: #fffffa; -} - -.time_passed { - padding: 1em 5em 1em 5em -} - -.much_time_passed { - padding: 2em 5em 2em 5em -} - -.edit_link { - float: right; - font-size: 80%; - position: relative; - bottom: 0; - padding-top: 2em; -} - -.lined_header { - border-bottom: 1pt solid gray; - padding: 10pt 0pt 5pt 0pt; - margin: 30pt 0pt 20pt 0pt; -} - - -.nav_bar { - font-size: 80%; - color: #222222; - background-color: #eeeeee; -} - -/* -.nav_bar a { - color: #222222; - padding-left: 1pt; - padding-right: 1pt; -} -*/ -body { - margin:0; - padding:0 0 15px 0; - -} -.body { - margin: 10; - padding: 10; -} diff -r 09ed722f2759 -r 53b890d1ae90 l3config.pm --- a/l3config.pm Tue Jun 27 18:00:09 2006 +0300 +++ b/l3config.pm Fri Aug 04 17:41:31 2006 +0300 @@ -86,7 +86,7 @@ "detach" => "yes", "agent_pidfile" => "$ENV{HOME}/.lilalo/l3-agent.pid", - "backend_address" => "192.168.15.254", + "backend_address" => "xgu.ru", "backend_port" => "18030", "backend_pidfile" => "/tmp/l3-backend.pid", "backend_datafile" => "/var/lilalo/lablogs-xml/backend.xml",