delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/10/20/11:46:49

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Mon, 20 Oct 2003 11:45:25 -0400 (EDT)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: cygwin AT cygwin DOT com
Subject: Re: ProFTPD 1.2.9rc2: "missing /var/log/wtmp"
In-Reply-To: <20031020153332.GM2092@tishler.net>
Message-ID: <Pine.GSO.4.56.0310201134000.15002@slinky.cs.nyu.edu>
References: <20031020122527 DOT GG2092 AT tishler DOT net> <3F710B1D00098A62 AT mssbzhh-int DOT msg DOT bluewin DOT ch>
<20031020153332 DOT GM2092 AT tishler DOT net>
Importance: Normal
MIME-Version: 1.0

On Mon, 20 Oct 2003, Jason Tishler wrote:

> Bruno,
>
> On Mon, Oct 20, 2003 at 03:58:28PM +0200, Grossniklaus Bruno wrote:
> > >    $ ls -l /var/log/wtmp
> > >    -rw-rw-rw-    1 jt       Domain U   132748 Oct 15 17:27 /var/log/wtmp
> >
> > And how/when did you get this dir?
>
> Sorry I don't recall, but I think I created it myself.
>
> > Now I have:
> > $ ls -l /var/log/
> > insgesamt 258
> > -rwxrwxrwx+   1 admin-se Users       16077 20. Oct 15:44 setup.log
> > -rwxrwxrwx+   1 admin-se Users      247243 20. Oct 15:44 setup.log.full
> >
> > There is no /var/log/wtmp
> >
> > Do we have to create /var/log/wtmp manually?
>
> AFAICT, yes.
>
> Given the following:
>
>     $ for i in /usr/*bin/*.exe; do  strings $i | fgrep -q wtmp; if [ $?  -eq 0 ]; then echo $i; fi; done
>     /usr/bin/emacs-21.2.exe
>     /usr/bin/emacs-nox.exe
>     /usr/bin/emacs.exe
>     /usr/bin/last.exe
>     /usr/bin/rxvt.exe
>     /usr/bin/users.exe
>     /usr/bin/who.exe
>     /usr/sbin/in.ftpd.exe
>     /usr/sbin/in.rlogind.exe
>     /usr/sbin/in.telnetd.exe
>     /usr/sbin/in.uucpd.exe
>     /usr/sbin/proftpd.exe
>     /usr/sbin/sshd.exe
>
> I'm not sure what package should be responsible for creating
> /var/log/wtmp.
>
> Jason

IMO, all of them[*] (or, rather, those that actually *require*
/var/log/wtmp -- some may simply check for its presence and keep going if
the don't find it, in which case it's optional).  Here's the code to stick
into the postinstall scripts (straight out of
/etc/postinstall/cygutils.sh.done dated Jul 13 2002):

if [ ! -d /var/log ] ; then \
  mkdir -p /var/log ;
fi
if [ ! -f /var/log/wtmp ] ; then \
  touch /var/log/wtmp ;
fi

FWIW, it'd be safer to also check whether this file is a symlink (i.e.,
add "-a ! -l /var/log/wtmp" to the test), but this should do for now.
	Igor
[*] There aren't that many packages, actually: "sh-utils", "inetutils",
"emacs", "rxvt", "openssh", and "proftpd".

-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019