close open tty
hi
i have a created a service in Fedora 19 with following data inside [Unit] Description=Autologin Service Before=getty@tty1.service getty@tty2.service getty@tty3.service getty@tty4.service getty@tty5.service getty@tty6.service [Service] Type=Simple ExecStart=/usr/sbin/mingetty --autologin root --loginprog=/usr/bin/startx.autologin --noclear tty7 38400 Restart=always RestartSec=3 [Install] WantedBy=multi-user.target my problem is when I stop the service the open tty7 is still open. I want it to be inaccessible when i stop the service. |
I have done a work around on this
/sbin/agetty --noclear tty7 38400 linux & PID=`ps -ax | grep tty7 | grep agetty | awk '{print $1}'` kill -9 $PID deallocvt 7 |
that is a single pkill command (like this):
pkill -9 -f 'agetty.*tty7' but you should try it with pkill -15 or pkill -2 instead of -9 |
All times are GMT -5. The time now is 11:34 AM. |