mgetty logfiles
Gert Doering (gert@greenie.muc.de)
Wed, 23 Apr 1997 18:25:36 +0200
Hi,
Marc SCHAEFER wrote:
> Udo Erdelhoff (udo@iml.fhg.de) wrote:
> > I'm using mgetty-1.0.0 on a Sun Sparcstation 2 with SunOS 4.1.3. Almost
> > everything works fine, only the logfiles give me a lot of trouble. I need
> > to archive mgetty's logfiles on a weekly basis. Unfortunatelz, mgetty
> > keeps his logfile open. I can create a backup of the logfile without
> > problems; if I try to cut it (cp /dev/null /var/log/mgetty.log.cua0),
> > things get ugly ...
>
> I do it that way:
> mv logfile tempfile
> kill `cat /var/run/mg-pid.ttyS0
>
> Of course you also kill whoever is logging in at that time, so ...
If you send a signal -USR2, it will only make mgetty abort if noone is
logging in *right now*. (And if someone is logging in, mgetty will
"terminate" very soon now anyway...)
> Other idea:
> mv temp-file the_file
> mv logfile temp-file
>
> In that case, you have one day (supposing you do it every day) for
> the log-file to be closed by mgetty.
Yep.
gert
--
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany gert@greenie.muc.de
fax: +49-89-3545980 gert.doering@physik.tu-muenchen.de
.