mgetty logfiles
"Robert J. Brown" (rj@eli.wariat.org)
Tue, 22 Apr 1997 08:46:53 -0500
>>>>> "Udo" == Udo Erdelhoff <udo@iml.fhg.de> writes:
Udo> Hi, I'm using mgetty-1.0.0 on a Sun Sparcstation 2 with SunOS
Udo> 4.1.3. Almost everything works fine, only the logfiles give
Udo> me a lot of trouble. I need to archive mgetty's logfiles on a
Udo> weekly basis. Unfortunatelz, mgetty keeps his logfile open. I
Udo> can create a backup of the logfile without problems; if I try
Udo> to cut it (cp /dev/null /var/log/mgetty.log.cua0), things get
Udo> ugly ...
Udo> The only solution I've found is to shut down mgetty by
Udo> changing the ttytab and sending a hangup signal to
Udo> init. After that, I can modify the logfile, reverse the
Udo> changes to the ttytab and let init reread it.
Udo> I'd like to have a more elegant solution. Any idea will be
Udo> appreciated.
Udo> /s/Udo
I like to do an "echo Logfile reset on `date` > logfile" to reset
logfiles. You are not removing the file, just changing its contents,
so it works fine without having to shut down the program that has the
log file open. Since the > operator is used instead of the >>
operator, it starts at the beginning of the file and writes the single
line that documents when the logfile was reset.
--
-------- "And there came a writing to him from Elijah" [2Ch 21:12] --------
Robert Jay Brown III rj@eli.wariat.org http://eli.wariat.org 1 847 705-0424
Elijah Laboratories Inc.; 37 South Greenwood Avenue; Palatine, IL 60067-6328
----- M o d e l i n g t h e M e t h o d s o f t h e M i n d ------
.