Понедельник (03/26/18)

/dev/pts/0
15:10:08
#~
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}
        mkdir /etc/lilalo/
        cp l3config.pm /etc/lilalo/
}                                                             95,1          44%
100         cp l3bashrc ${user_home}/${lilalo_home}
101         cp l3prompt ${user_home}/${lilalo_home}
102         chmod 755 ${user_home}/${lilalo_home}/l3prompt
103         chown -R $user ${user_home}/${lilalo_home}
104         echo l3cd=${lilalo_context}/$user > ${user_home}/${lilalo_rc}
105         chown -R $user ${user_home}/${lilalo_rc}
106     done
107     set +x
108 }
109
110 install_to_users_bashrc()
111 {
112     users="$@"
113     for user in $users
114     do
115         user_home=`get_user_home "$user"`
116         grep -q lilalo ${user_home}/.bashrc 2> /dev/null\
117         || echo "[ \$0 == l3script ] && . ${user_home}/.lilalo/l3bashrc && __
    l3_start" >> ${user_home}/.bashrc; chown -R ${user} ${user_home}/.bashrc
118     done
119 }
                                                              119,1         59%
  8 # Set this variables before installation:
  9
 10 lilalo_user=13-10-2014
 11 lab=NT-LNet
 12 install_l3bashrc_for_this_users=${users:-"root user"}  # users who will use
    l3agent and l3script
 13 lilalo_context="/users/${lilalo_user}/${lab}/${hostname}"
 14
 15 #
 16 #############################################################################
    ###
 17
 18
 19 lilalo_rc=.l3rc
 20 lilalo_home=.lilalo
 21 url_lilalo="http://xgu.ru/lilalo"
 22 url_l3bashrc="${url_lilalo}"/l3bashrc
 23 url_l3agent="${url_lilalo}"/l3-agent
"install" 185L, 5268C записано