Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   CentOS (http://www.linux-archive.org/centos/)
-   -   CentOS 6: /etc/init/start-ttys.conf ignored (http://www.linux-archive.org/centos/595093-centos-6-etc-init-start-ttys-conf-ignored.html)

Reindl Harald 11-06-2011 02:55 AM

CentOS 6: /etc/init/start-ttys.conf ignored
 
hi

why are tty3-tty6 started after this config change?

i would like to have only tty1 finally becasue on a virtual machine
there is no need for the other processes since CTRL+ALT+Fx is caught
by the own system and remote console mostly not needed at all

[root@centos ~]# cat /etc/init/start-ttys.conf
#
# This service starts the configured number of gettys.

start on stopped rc RUNLEVEL=[2345]

env ACTIVE_CONSOLES=/dev/tty[1-2]
env X_TTY=/dev/tty1
task
script
. /etc/sysconfig/init
for tty in $(echo $ACTIVE_CONSOLES) ; do
[ "$RUNLEVEL" = "5" -a "$tty" = "$X_TTY" ] && continue
initctl start tty TTY=$tty
done
end script

[root@centos ~]# ps aux | grep tty
root 1626 0.0 0.0 4044 540 tty1 Ss+ 01:12 0:00 /sbin/mingetty /dev/tty1
root 1628 0.0 0.0 4044 544 tty2 Ss+ 01:12 0:00 /sbin/mingetty /dev/tty2
root 1630 0.0 0.0 4044 544 tty3 Ss+ 01:12 0:00 /sbin/mingetty /dev/tty3
root 1632 0.0 0.0 4044 540 tty4 Ss+ 01:12 0:00 /sbin/mingetty /dev/tty4
root 1634 0.0 0.0 4044 544 tty5 Ss+ 01:12 0:00 /sbin/mingetty /dev/tty5
root 1636 0.0 0.0 4044 540 tty6 Ss+ 01:12 0:00 /sbin/mingetty /dev/tty6

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

"John R. Dennison" 11-06-2011 03:27 AM

CentOS 6: /etc/init/start-ttys.conf ignored
 
On Sun, Nov 06, 2011 at 04:55:53AM +0100, Reindl Harald wrote:
> hi
>
> why are tty3-tty6 started after this config change?

The script is sourcing in /etc/sysconfig/init which has ACTIVE_CONSOLES
defined; when the file is sourced it overwrites the values you set in
/etc/init/start-ttys.conf.




John
--
In today's online world, what your mother told you is true, only more so:
people really can judge you by your friends.

-- Harold Abelson, MIT computer science professor, on personal information
that can be gleaned from social networking sites, NY Times, 17 March 2010
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

Reindl Harald 11-06-2011 03:33 AM

CentOS 6: /etc/init/start-ttys.conf ignored
 
Am 06.11.2011 05:27, schrieb John R. Dennison:
> On Sun, Nov 06, 2011 at 04:55:53AM +0100, Reindl Harald wrote:
>> hi
>>
>> why are tty3-tty6 started after this config change?
>
> The script is sourcing in /etc/sysconfig/init which has ACTIVE_CONSOLES
> defined; when the file is sourced it overwrites the values you set in
> /etc/init/start-ttys.conf.

thank you, that was it!

[root@centos ~]# ps aux | grep tty
root 1660 0.0 0.0 4044 540 tty1 Ss+ 05:32 0:00 /sbin/mingetty /dev/tty1
root 1724 0.0 0.0 105292 884 pts/0 S+ 05:32 0:00 grep --color tty

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


All times are GMT. The time now is 03:55 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.