Return to BSD News archive
Newsgroups: comp.os.386bsd.questions Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!elroy.jpl.nasa.gov!swrinde!cs.utexas.edu!uunet!brunix!cs.brown.edu!Mark_Weaver From: Mark_Weaver@brown.edu Subject: Re: [netbsd 0.9] terminal on com ports In-Reply-To: b6ps@jupiter.sun.csd.unb.ca's message of Mon, 18 Oct 1993 15:40:54 GMT Message-ID: <MARK_WEAVER.93Oct19022944@excelsior.cis.brown.edu> Sender: news@cs.brown.edu Organization: Brown University Department of Computer Science References: <2956kr$bm5@homer.cs.mcgill.ca> <1993Oct13.121947.19474@jupiter.sun.csd.unb.ca> <wmbfmk.750607495@rwc.urc.tue.nl> <1993Oct18.154054.27641@jupiter.sun.csd.unb.ca> Date: Tue, 19 Oct 1993 06:29:44 GMT Lines: 38 In article <1993Oct18.154054.27641@jupiter.sun.csd.unb.ca> b6ps@jupiter.sun.csd.unb.ca (Peter Howlett) writes: > In article <wmbfmk.750607495@rwc.urc.tue.nl> wmbfmk@rwc.urc.tue.nl (Marc van Kempen) writes: > > >But, I have 'mesg y' and 'biff y' in my .login and when they are > >executed they give a message that I can't write to com0, but in my /etc/ttys > >I specify tty00, so I should be using /dev/tty00 for the connection. > >(BTW com0 is a link to tty00) > >As a result of this, I think, I can also not see myself > >with 'w' when I'm logged in via the dialup. > > > >It seems like there's something structurally wrong, or not? > > > > For what it's worth, I have this problem (sort of) as well. When > I use a dialup line defined on com0, I get logged in with tty00. > Of course this means that com0 still has only rw perms for root so > mesg y and so on wont work if they dont know I'm on tty00. I also > do not show up in the utmp file (I do however, show up in wtmp). > > Why do I get logged in with tty00 instead of com0 (as listed in ttys)? > Got me--- The problem is that /var/run/dev.db (created by dev_mkdb in /etc/rc), which makes a database of all the devices in /dev, adds all files to the database, rather than skipping the symlinks. When programs try to find out what tty they are on, it looks it up in the database, and it is a toss-up which one it finds. (actually, I'm sure it's well defined, but I haven't looked into it) A fix which I use, is to modify dev_mkdb.c to use lstat() instead of stat(), and then make sure that the main device file (not the symlink) is put in /etc/ttys. This fixes the problem completely. Mark -- -------------------------------------------------------------------- Email: Mark_Weaver@brown.edu | Brown University PGP Key: finger mhw@cs.brown.edu | Dept of Computer Science