# HG changeset patch # User devi # Date 1119939367 -10800 # Node ID 05d496f33d7608aeb0a2946909f48e22c7765c59 # Parent 37d701f903ec0f32dfdf954f19aede9cb2625bd7 lm-install: проверка операционной системы на стороне клиента. В зависимости от того FreeBSD это или Linux нужно по-разному запускать script diff -r 37d701f903ec -r 05d496f33d76 lm --- a/lm Thu Jun 16 11:44:38 2005 +0300 +++ b/lm Tue Jun 28 09:16:07 2005 +0300 @@ -43,7 +43,7 @@ "sshkey" => "$ENV{HOME}/.ssh/id_dsa.pub", "lmssh" => "./lm-ssh", "lminstall" => "./lm-install", - "ssh_user" => "r", + "ssh_user" => "root", ); our %Run = ( diff -r 37d701f903ec -r 05d496f33d76 lm-install --- a/lm-install Thu Jun 16 11:44:38 2005 +0300 +++ b/lm-install Tue Jun 28 09:16:07 2005 +0300 @@ -71,15 +71,18 @@ # LabMaker:START TTY=`tty` + uname -a | grep -qi bsd && bsd=yes + this_term=`w | grep "${TTY##/dev/}" | awk '{print $8;}'` # freeBSD: - this_term=`w | grep "${TTY##/dev/tty}" | awk '{print $6;}'` + [ -n "$bsd" ] && this_term=`w | grep "${TTY##/dev/tty}" | awk '{print $6;}'` + LMHOME=~/.labmaker mkdir -p ${LMHOME} flush="-f" #linux - flush="-t 0" #freebsd + [ -n "$bsd" ] && flush="-t 0" #freebsd export PS1='\[` a="$?"; HIDDEN=$([ "$a" = 0 ] || echo -n ^"$a")$(echo -n _${UID}_)$(echo -n _$$_)$(date\ +"%j$(cat ~/.labmaker/lab 2>/dev/null) %H:%M:%S");