lilalo

changeset 71:d499fa3b2af1

Na lilalo@moskau.xt.vpn uspeshno zavelos i\
zarabotalo. + Sohranenie istorii pri vyhode
author devi
date Sat Feb 04 00:47:22 2006 +0200 (2006-02-04)
parents 6f5ad37fc8d9
children 0ffdebbccfce
files l3-cgi l3bashrc
line diff
     1.1 --- a/l3-cgi	Fri Feb 03 22:49:46 2006 +0200
     1.2 +++ b/l3-cgi	Sat Feb 04 00:47:22 2006 +0200
     1.3 @@ -84,6 +84,7 @@
     1.4  				my $h = $t->{host}->{$host};
     1.5  				$print .= "$host";
     1.6  				$print .= " ".$h->{firstname}." ".$h->{surname}." ";
     1.7 +				$print .= " ".$h->{company}." ";
     1.8  				$print .= "<a href='/cgi-bin/l3/".$tdate."/".$host."/root'>root</a> ";
     1.9  				$print .= "<a href='/cgi-bin/l3/".$tdate."/".$host."/".$h->{user}."'>".$h->{user}."</a> ";
    1.10  				$print .= "\n";
     2.1 --- a/l3bashrc	Fri Feb 03 22:49:46 2006 +0200
     2.2 +++ b/l3bashrc	Sat Feb 04 00:47:22 2006 +0200
     2.3 @@ -21,6 +21,8 @@
     2.4  
     2.5  _l3_env()
     2.6  {
     2.7 +    trap _l3_close_session 2
     2.8 +    trap _l3_close_session EXIT
     2.9      true
    2.10  }
    2.11  
    2.12 @@ -35,8 +37,8 @@
    2.13  
    2.14  _l3_start_session()
    2.15  {
    2.16 -    L3_SESSION_ID=${L3_TTY##*/}-$$
    2.17 -    L3_HOME=~/.lilalo/
    2.18 +    export L3_SESSION_ID=${L3_TTY##*/}-$$
    2.19 +    export L3_HOME=~/.lilalo/
    2.20      mkdir -p $L3_HOME
    2.21  
    2.22      uname -a | grep -qi bsd && bsd=yes
    2.23 @@ -77,6 +79,10 @@
    2.24  
    2.25  _l3_close_session()
    2.26  {
    2.27 -    history > $L3_HOME/$L3_SESSION_ID.info
    2.28 +    ( 
    2.29 +        echo '<history>'
    2.30 +        history | sed 's/&/\&amp;/; s/</\&lt;/g; s/>/\&gt;/g'
    2.31 +        echo '</history>'
    2.32 +    ) >> $L3_HOME/$L3_SESSION_ID.info
    2.33  }
    2.34