Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Aug 2001 21:47:48 +0200
From:      "Alfatrion" <alfatrion@cybertron.tmfweb.nl>
To:        "Richard Smith" <rdls@satamatics.com>
Cc:        <freebsd-questions@freebsd.org>
Subject:   Re: ssh and background processes
Message-ID:  <023901c12367$c7941960$231fa8c0@kruijff>
References:  <20010810185605.7142.qmail@web11703.mail.yahoo.com> <20010811231559.C733@gaia.home.rdls.net>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.

------=_NextPart_000_0224_01C12378.6D5B6B40
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

> On Fri, Aug 10, 2001 at 11:56:05AM -0700, Tim Erlin wrote:
> > Two questions:
> >
> > 1. I keep getting booted from SSH. On windows (putty),
> > I get a 'host key check failed' error (or something
> > similar. On Linux I get 'dispatch_protocol_error:
> > rekeying is not supported.' The box I'm connecting to
> > is FreeBSD -STABLE. Can I/Should I change this?
>
> I don't understand this. My ssh sessions stay up for ever,
> admittedly they're FreeBSD -> FreeBSD :-)
>
>
> > 2. The reason this is a problem is that I'm trying to
> > update my sources, but the SSH terminal doesn't stay
> > open long enough to complete 'make buildworld.' How do
> > I send this process into the background so that I can
> > logout and let it run?
>
> Depends on which shell you're using. The shell I use
> (zsh) suspends the foreground process with a Ctrl-Z
> then the 'bg' command moves it to the background.
> You would need the 'disown' command to allow you to
> log out. Of course, you could always start it off in
> the background/disowned:
>
> # make buildworld >logfile 2&>1 &!
>
> Time to buy a good unix book I think ;-)
>
>
> >
> > TIA, as always...
> >
> > --Tim Erlin
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Send instant messages & get email alerts with Yahoo! Messenger.
> > http://im.yahoo.com/
> >
> > To Unsubscribe: send mail to majordomo@FreeBSD.org
> > with "unsubscribe freebsd-questions" in the body of the message
>
> --
> Richard Smith
> Network Systems Director
> Satamatics Ltd
> Green Lane, Tewkesbury, GL20 8HD, United Kingdom
> Tel: +44 1684 278610
> Fax: +44 1684 278611
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message
>
First of all: I have no clue what to do!

But you could try to update your machine and see if it still happens. I
includes some of my script i use for this. I call update from my crontab. It
will call 1) cvs and then 2) build. One this is complete you can run install
from a single user mode. Afster each step it send a mail reporting it is
done with that step. The mails are in dutch, but are summaries from the
engles handbook.

Alex
It send mails after each


------=_NextPart_000_0224_01C12378.6D5B6B40
Content-Type: application/octet-stream;
	name="install.sh"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="install.sh"

logfile=3D/root/install.log=0A=
errfile=3D/root/install.err=0A=
date=3D`date +'%b %d %k:%M:%S'`=0A=
=0A=
cd /usr/src=0A=
make installkernel KERNCONF=3DKERNELFILE > $logfile 1> $errfile=0A=
make installworld >> $logfile 1>> $errfile=0A=
cp -Rp /etc /etc.old=0A=
mergemaster -ai >> $logfile 1>> $errfile=0A=
cd /usr/src/release/sysinstall=0A=
make all install=0A=
=0A=
(	echo 'install cycle compleet op KERNELFILE'=0A=
	echo 'Zie de logfiles voor meer info'=0A=
	echo 'logfile:	' $logfile=0A=
	echo 'errfile:	' $errfile=0A=
	echo 'start:	' $date=0A=
	date=3D`date +'%b %d %k:%M:%S'`=0A=
	echo 'stop:	' $date=0A=
) | mail -s 'build KERNELFILE' mail@adress.com=0A=
reboot=0A=

------=_NextPart_000_0224_01C12378.6D5B6B40
Content-Type: application/octet-stream;
	name="cvs.sh"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="cvs.sh"

#!/bin/sh=0A=
=0A=
cvs=3D"/home/alex/cvs/"=0A=
logfile=3D"/root/cvs.log"=0A=
errfile=3D"/root/cvs.err"=0A=
supfile=3D"/root/supfile"=0A=
date=3D`date +'%b %d %k:%M:%S'`=0A=
=0A=
/usr/local/bin/cvsup /root/supfile > $logfile 2> $errfile=0A=
=0A=
(	echo 'cvs cycle compleet op KERNELFILE'=0A=
	echo 'Zie de logfiles voor meer info'=0A=
	echo 'logfile:	' $logfile=0A=
	echo 'errfile:	' $errfile=0A=
        echo 'start:	' $date=0A=
	date=3D`date +'%b %d %k:%M:%S'`=0A=
	echo 'stop:	' $date=0A=
) | mail -s 'cvs KERNELFILE' mail@adress.com=0A=

------=_NextPart_000_0224_01C12378.6D5B6B40
Content-Type: application/octet-stream;
	name="build.sh"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="build.sh"

#!/bin/sh=0A=
=0A=
logfile=3D"/root/build.log"=0A=
errfile=3D"/root/build.err"=0A=
date=3D`date +'%b %d %k:%M:%S'`=0A=
=0A=
cd /usr/src=0A=
rm -rf /usr/obj/*=0A=
make buildworld > $logfile 2> $errfile=0A=
make buildkernel KERNCONF=3DKERNELFILE >> $logfile 2i>> $errfile=0A=
=0A=
(	echo 'build cycle compleet op KERNELFILE'=0A=
	echo 'Zie de logfiles voor meer info'=0A=
	echo 'logfile:	' $logfile=0A=
	echo 'errfile:	' $errfile=0A=
	echo 'start:	' $date=0A=
	date=3D`date +'%b %d %k:%M:%S'`=0A=
	echo 'stop:	' $date=0A=
) | mail -s 'build KERNELFILE' mail@adress.com=0A=

------=_NextPart_000_0224_01C12378.6D5B6B40
Content-Type: application/octet-stream;
	name="update.sh"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="update.sh"

notefile=3D/root/install.note=0A=
=0A=
(       echo "Begin van FreeBSD update cycle op KERNELFILE"=0A=
	echo ""=0A=
	echo "Dit prosess bevat drie stappen. De eerst twee worden automaties"=0A=
	echo "uitgevoert. Hier na moet men de log files controleren. Daarna"=0A=
	echo "moet men met de hand zelf de laaste stap in single mode =
uitvoeren."=0A=
	echo "Na iedere stap word er een email verstuurt aan jou. Stap drie =
word"=0A=
	echo "terzijne tijd nog uitvoerig beschreven."=0A=
	echo ""=0A=
	echo "De stappen:"=0A=
	echo " 1. cvs"=0A=
	echo " 2. build"=0A=
	echo " 3. install (in single mode met de hand)"=0A=
	echo ""=0A=
	echo "Veel succes,"=0A=
	echo "Charlie Root"=0A=
) | mail -s 'update KERNELFILE' mail@adress.com=0A=
=0A=
/root/bin/cvs.sh=0A=
/root/bin/build.sh=0A=
=0A=
(       echo "Laaste stap van de Begin van FreeBSD update cycle op =
KERNELFILE"=0A=
	echo " 3. install"=0A=
	echo ""=0A=
	echo "Na dat men de logfiles heeft gecontroleer op controle, kan men =
door"=0A=
	echo "gaan met deze stap. Indien men dit nog nooit gedaan heeft doet =
men"=0A=
	echo "er goed aan om de volgende pagina te bekijken uit het handboek =
van"=0A=
	echo "FreeBSD: =
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html"=0A=
	echo "De stappen die in dit emailtje beschreven staan worden daar"=0A=
	echo "uitvoerig uitgelecht."=0A=
	echo ""=0A=
	echo " 1. (20.4.1) Lees /usr/src/UPDATING"=0A=
	echo " 2. (20.4.2) Controleer de bestanden /etc/defaults/make.conf en =
/etc/make.conf."=0A=
	echo " 3. (20.4.3) Update de file /etc/group"=0A=
	echo " 4. (20.4.4) Ga de single mode in door het commando 'shutdown =
now' uit tevoeren."=0A=
	echo " 5. Voer de shell install.sh uit. Midden in dit process is uw =
aandacht nodig."=0A=
	echo ""=0A=
	echo "Groetjes,"=0A=
	echo "Charlie Root"=0A=
	echo ""=0A=
	echo "P.S. Dit bericht staat ook " $notefile " hier."=0A=
) > $notefile=0A=
=0A=
mail -s 'update KERNELFILE' mail@adress.com < $notefile=0A=
cat $nodefile=0A=

------=_NextPart_000_0224_01C12378.6D5B6B40--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?023901c12367$c7941960$231fa8c0>