home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!munnari.oz.au!yoyo.aarnet.edu.au!sirius.ucs.adelaide.edu.au!iagu.itd.adelaide.edu.au!newton
- From: newton@iagu.itd.adelaide.edu.au (Mark Newton)
- Newsgroups: comp.os.minix
- Subject: Re: Question init.c <--> /etc/utmp
- Keywords: init login utmp wtmp
- Message-ID: <8341@sirius.ucs.adelaide.edu.au>
- Date: 27 Aug 92 05:49:42 GMT
- References: <1992Aug25.135457.26129@walter.cray.com> <meulenbr.714819852@cstw168>
- Sender: news@ucs.adelaide.edu.au
- Organization: University of Adelaide, South Australia
- Lines: 34
- Nntp-Posting-Host: iagu.itd.adelaide.edu.au
-
- In article <meulenbr.714819852@cstw168> meulenbr@prl.philips.nl (Frans Meulenbroeks) writes:
- >leno@grumpy.cray.com (Scott J. Leno) writes:
- >
- >> I have been looking into why I seem to be logged in several times when I
- >> run the who command. It stems from init not zeroing the /etc/utmp entry
- >
- >In /etc/rc add the line:
- >>/etc/utmp
- >which will clear the file whenever the system is booted.
- >No need to change init.
-
- Actually, there is a need to change init to handle wtmp properly in the
- Amiga MINIX Prentice-Hall distribution (and probably the other m68k
- MINIXes as well).
-
- There's a call to time() that looks something like "ut.ut_time = time()"
- which doesn't work due to the fact that init.c doesn't #include <time.h>.
- The compiler thinks, "Duh! time() hasn't been prototyped, so I'll
- assume that it returns an int!" when it should be returning a long.
- m68k byte ordering no doubt makes it work properly under PC MINIX,
- but the 68000 version of the ACK compiler makes time() (and most other
- functions, for that matter) return incorrect values if they're not
- prototyped.
-
- So, if any m68k MINIX users have been puzzled about all the question
- marks in the output from the "last" command, you can fix it by putting
- #include <time.h> at the top of init.c and rebuilding.
-
- - mark
- --
- ------------------------------------------------------------------
- 'Do not expose your LaserWriter to naked flame...'
- newton@iagu.itd.adelaide.edu.au - Apple LaserWriter Manual
- ------------------------------------------------------------------
-