On 05/02/2014 7:39 AM, =?windows-1252?Q?Bill_Askew?= wrote:
I created a file tty1.conf

stop on runlevel [S016]

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
        . /etc/sysconfig/init
        for tty in $(echo $ACTIVE_CONSOLES) ; do
                [ "$RUNLEVEL" = "5" -a "$tty" = "$X_TTY" ] &&amp; continue
                initctl start tty TTY=$tty
        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: <gede...@cs.umanitoba.ca>
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

Reply via email to