# HG changeset patch # User devi # Date 1117359651 -10800 # Node ID 56e8b17b1823ce6683cf01498b367bdc8f88ccc4 # Parent 614945eed906cc810cc9d8b3ba56a4600276bc32 lm-install поправлен. * Исправлено вычисление имени пользователя для chown ~/.labmaker после инсталляции. * Ничего не добавляется в профайл, всё чере basrhc * PS1 меняется до exec diff -r 614945eed906 -r 56e8b17b1823 lm-install --- a/lm-install Tue May 24 16:25:24 2005 +0300 +++ b/lm-install Sun May 29 12:40:51 2005 +0300 @@ -73,19 +73,19 @@ this_term=`w | grep "${TTY##/dev/}" | awk '{print $8;}'` # freeBSD: - this_term=`w | grep "${TTY##/dev/tty}" | awk '{print $6;}'` + #this_term=`w | grep "${TTY##/dev/tty}" | awk '{print $6;}'` if [ -n "$this_term" ] && echo $this_term | grep -qv script then LMHOME=~/.labmaker mkdir -p ${LMHOME} flush="-f" #linux - flush="-t 0" #freebsd + #flush="-t 0" #freebsd + PS1='\[` a="$?"; + HIDDEN=$([ "$a" = 0 ] || echo -n ^"$a")$(echo -n _${UID}_)$(echo -n _$$_)$(date\ + +"%j$(cat ~/.labmaker/lab 2>/dev/null) %H:%M:%S"); + echo $HIDDEN`\033[50D\033[K\][\u@\h:\W]\$ ' exec script $flush -q $LMHOME/${TTY##*/}-$$.script fi - PS1='\[` a="$?"; - HIDDEN=$([ "$a" = 0 ] || echo -n ^"$a")$(echo -n _${UID}_)$(echo -n _$$_)$(date\ - +"%j$(cat ~/.labmaker/lab 2>/dev/null) %H:%M:%S"); - echo $HIDDEN`\033[50D\033[K\][\u@\h:\W]\$ ' # LabMaker:END LM_bash_profile cat $temp_file > $profile @@ -158,20 +158,24 @@ exit fi - for user in $users_to_install + for home in $users_to_install do - home=$user # fix this! + # fix this! + user=${home%/} + user=${user##*/} mkdir -p $home/.labmaker echo $first_lab > $home/.labmaker/lab - chown -R ${user##*/} $home/.labmaker + chown -R $user $home/.labmaker - if [ ! -e $home/.bash_profile ] - then - echo '. ~/.bashrc' >> ~/.bash_profile - fi - [ -e $home/.bash_profile ] \ - && install_to_profile $home/.bash_profile \ - && echo LabMaker is installed to $home/.bash_profile + #if [ ! -e $home/.bash_profile ] + #then + # echo '. ~/.bashrc' >> ~/.bash_profile + #fi + #[ -e $home/.bash_profile ] \ + # && install_to_profile $home/.bash_profile \ + # && echo LabMaker is installed to $home/.bash_profile + + echo Don\'t forget to check .bash_profile for .bashrc call [ -e $home/.profile ] && install_to_profile $home/.profile \ && install_to_profile $home/.profile \ @@ -200,13 +204,13 @@ echo $first_lab > $home/.labmaker/lab chown -R ${user##*/} $home/.labmaker - if [ ! -e $home/.bash_profile ] - then - echo '. ~/.bashrc' >> ~/.bash_profile - fi - [ -e $home/.bash_profile ] \ - && uninstall_from_profile $home/.bash_profile \ - && echo LabMaker is uninstalled from $home/.bash_profile + #if [ ! -e $home/.bash_profile ] + #then + # echo '. ~/.bashrc' >> ~/.bash_profile + #fi + #[ -e $home/.bash_profile ] \ + # && uninstall_from_profile $home/.bash_profile \ + # && echo LabMaker is uninstalled from $home/.bash_profile [ -e $home/.profile ] && uninstall_from_profile $home/.profile \ && uninstall_from_profile $home/.profile \