lilalo

diff install @ 108:0d49f33696b3

Исправлены ошибки:
* инсталляция агента в .bash_profile - была проблема с переводом строки
* неверное определение агента в памяти в FreeBSD
* по умолчанию в l3cd не писалось имя хоста
author devi
date Sun Nov 12 17:34:47 2006 +0200 (2006-11-12)
parents 53b890d1ae90
children 3cd466f35ad6
line diff
     1.1 --- a/install	Fri Aug 04 17:41:31 2006 +0300
     1.2 +++ b/install	Sun Nov 12 17:34:47 2006 +0200
     1.3 @@ -1,5 +1,21 @@
     1.4  #!/bin/sh
     1.5  
     1.6 +hostname=`hostname`
     1.7 +uname -a | grep -qi freebsd || hostname=`hostname -f`
     1.8 +
     1.9 +###############################################################################
    1.10 +#
    1.11 +# Set this variables before installation:
    1.12 +
    1.13 +lilalo_user="YOUR-L3BACKEND-USER"
    1.14 +lab="SET-YOUR-FIRSTLAB-NAME-HERE"
    1.15 +install_l3bashrc_for_this_users="root user"  # users who will use l3agent and l3script
    1.16 +lilalo_context="/users/${lilalo_user}/${lab}/${hostname}"
    1.17 +
    1.18 +#
    1.19 +###############################################################################
    1.20 +
    1.21 +
    1.22  lilalo_rc=.l3rc
    1.23  lilalo_home=.lilalo
    1.24  url_lilalo="http://xgu.ru/lilalo"
    1.25 @@ -9,6 +25,7 @@
    1.26  url_perl_modules=${url_lilalo}/
    1.27  perl_modules="Term-VT102 Text-Iconv"
    1.28  
    1.29 +
    1.30  wget=wget
    1.31  uname -a | grep -qi bsd && wget=fetch
    1.32  
    1.33 @@ -17,16 +34,6 @@
    1.34  redC='\033[0;31m'
    1.35  greenC='\033[0;32m'
    1.36  
    1.37 -hostname=`hostname`
    1.38 -uname -a | grep -qi freebsd || hostname=`hostname -f`
    1.39 -
    1.40 -
    1.41 -# Ask this variables:
    1.42 -
    1.43 -lilalo_user="devi"
    1.44 -lab="lilalo-installation"
    1.45 -install_l3bashrc_for_this_users="root ak devi"
    1.46 -lilalo_context="/users/${lilalo_user}/${lab}/${hostname}"
    1.47  
    1.48  
    1.49  step()
    1.50 @@ -90,7 +97,7 @@
    1.51      do
    1.52          user_home=`get_user_home "$user"`
    1.53          grep -q l3-agent ${user_home}/.bash_profile 2> /dev/null \
    1.54 -        || { 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; }
    1.55 +        || { echo >> ${user_home}/.bash_profile ; cat ${user_home}/.bash_profile | sed '1s/^/l3-agentX/' | tr X '\n' > /tmp/$$$$l3 ; mv /tmp/$$$$l3 ${user_home}/.bash_profile; chown -R ${user} ${user_home}/.bash_profile; }
    1.56      done
    1.57  }
    1.58