SCIENTIFIC-LINUX-USERS Archives

February 2014

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Gilbert E. Detillieux" <[log in to unmask]>
Reply To:
Gilbert E. Detillieux
Date:
Wed, 5 Feb 2014 11:01:49 -0600
Content-Type:
text/plain
Parts/Attachments:
text/plain (44 lines)
On 05/02/2014 7:39 AM, =?windows-1252?Q?Bill_Askew?= wrote:
> I created a file tty1.conf
> Containing
>
> stop on runlevel [S016]
>
> respawn
> exec /sbin/mingetty --autologin <your user name> /dev/tty1
>
> I I modified start-ttys.conf like this;
>
> start on stopped rc RUNLEVEL=[2345]
>
> env ACTIVE_CONSOLES=/dev/tty[1-6]
> env X_TTY=/dev/tty2
> task
> script
> 	. /etc/sysconfig/init
> 	for tty in $(echo $ACTIVE_CONSOLES) ; do
> 		[ "$RUNLEVEL" = "5" -a "$tty" = "$X_TTY" ] &&amp; continue
> 		initctl start tty TTY=$tty
> 	done
> 	initctl start tty1
> end script

If I read this correctly, this will attempt to run two instances of 
mingetty on tty1 - one due to the for loop, and one due to your extra 
initctl line to start the tty1.conf file.  You could change 
ACTIVE_CONSOLES to eliminate tty1 from the list.

A cleaner approach that can be generalized to auto-logins on possibly 
other ttys would be to have, say, a tty-auto.conf file, based on 
tty.conf, that still accepts the "TTY=/dev/..." option, but exec's 
mingetty with the --autologin option.  You could then change 
start-ttys.conf to have two loops and two environment variables, say, 
ACTIVE_CONSOLES and AUTOLOGIN_CONSOLES, set to the lists of ttys to be 
started in each of the two ways.

-- 
Gilbert E. Detillieux		E-mail:	<[log in to unmask]>
Dept. of Computer Science	Web:	http://www.cs.umanitoba.ca/~gedetil/
University of Manitoba		Phone:	(204)474-8161
Winnipeg MB CANADA  R3T 2N2	Fax:	(204)474-7609

ATOM RSS1 RSS2