Subject: Re: using "shutdown" as a shell
To: Frederick Bruckman <fredb@immanent.net>
From: Lubos Vrbka <shnek@chemi.muni.cz>
List: netbsd-help
Date: 09/12/2003 08:09:21
> I noticed that you check that that the terminal name is
> "/dev/console". Does that mean you have wscons configured out of
> your kernel, or is it just that you don't have "wscons=YES" in
> "/etc/rc.conf"? I ask because it may be that ttyname() reports the
> actual underlying tty in some circumstancs (i.e. "/dev/ttyE0").

actually, in the old implementation of the program, there was checking 
whether terminal is "/dev/ttyE0". i think that i have wscons=YES in the 
/etc/rc.conf (if i'm not mistaken, it is automatically added by the 
installer). however, i'm sure that ttyname reports in this case terminal 
name as /dev/console:

if(strncmp(tty, TERMINAL, strlen(TERMINAL)))
{
	fprintf(stderr, "Sorry, not at %s.\n", TERMINAL);        			exit(0);
}

for TERMINAL == "/dev/ttyE0" it complained every time. with TERMINAL == 
"/dev/console" i have no "Sorry, not at /dev/console" message.

lubos

-- 
#####################################################
Mgr. Lubos Vrbka

Center for Complex Molecular Systems and Biomolecules
J. Heyrovsky Institute of Physical Chemistry
Academy of Sciences of the Czech Republic
Prague, Czech Republic

shnek@chemi.muni.cz
#####################################################