分类: 其他平台
2017-06-29 20:37:19
[root@fan3838 ~]# diff /etc/init/tty.conf ~/tty.conf.original 9c9 < exec /sbin/mingetty --autologin root $tty --- > exec /sbin/mingetty $tty [root@fan3838 ~]#但是这样是6个终端全部自动登录到root,还需要修改。开始想的是将每个终端都写明,不过发现不通过,google搜索资料后解决。
[root@fan3838 ~]# cat /etc/init/tty.conf # tty - getty # # this service maintains a getty on the specified device. # # do not edit this file directly. if you want to change the behaviour, # please create a file tty.override and put your changes there. stop on runlevel [s016] respawn instance $tty #exec /sbin/mingetty --autologin root $tty #### cut-here #### script if [ x$tty = x"/dev/tty2" ] || [ x$tty = x"/dev/tty3" ]; then export autologin="--autologin" export user="root" fi exec /sbin/mingetty $autologin $user $tty end script #### cut-here #### usage 'tty tty=/dev/ttyx - where x is console id' [root@fan3838 ~]#