Re: SPARCclassic wtmp log growing

From: Chris Newport (crn.news_at_nospam.netunix.com)
Date: 09/27/05


Date: Tue, 27 Sep 2005 01:55:52 +0100

James Sweet wrote:
> "Chris Newport" <crn.news@nospam.netunix.com> wrote in message
> news:dh7gk2$d6t$1$8302bc10@news.demon.co.uk...
>
>>James Sweet wrote:
>>
>>>I've got a SPARCclassic running Debian Linux which is having an odd
>
> issue,
>
>>>and the fact that it's happening with two different flavors of Linux
>>>suggests a quirk with the Sun rather than an issue with Linux. Anyway
>
> the
>
>>>wtmp log file is growing at an astonishing rate, 10-15MB a day which is
>
> a
>
>>>whole lot of text! I looked in it and it's filling up with a bunch of
>
> the
>
>>>stuff below. I'm running this box headless so perhaps that has something
>
> to
>
>>>do with it?
>>>
>>>
>>>[6] [30245] [1 ] [LOGIN ] [tty1 ] [ ] [Sep 19
>>
>>Comment out the offending ttys in /etc/inittab.
>
>
> But it's *all* the ttys! I need to have at least one of them active so I can
> log into it locally if I ever need to do that, of course that involves
> plugging in a keyboard and rebooting. Hmm maybe if I boot it with the kb
> plugged in then pull it?

Your serial console is /dev/ttyS0, or something similar.
the tty command will tell you which tty you are on.
So now you can add a few lines to /etc/rc.d/rc.S (or whatever your linux
  flavour uses to initialise single user before going multi)

If `tty` returns ttyS0 then cp /etc/inintab.serial /etc/inittab
  else cp /etc/inittab.kbd /etc/inittab

Exact implementation is left as an exercise for the reader
IOW it is 0dark30 and I am tired.