How to cancel the "login" in Yocto

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

How to cancel the "login" in Yocto

跳至解决方案
1,022 次查看
zohanlin
Contributor IV

Dear all, I want to make a SD burning image card,

so I need to cancel the login as below:

----------------------------------------------------------------------------------------------------------

NXP i.MX Release Distro 4.9.88-2.0.0 imx6qsabresd ttymxc0

imx6qsabresd login: root
root@imx6qsabresd:~#

----------------------------------------------------------------------------------------------------------

I try to add "/bin/login -f root" to /etc/profile, but it failed because the profile is executed after root login.

Someone could tell me how to cancel "login" ?

Thanks a lot,

zohan

标签 (3)
1 解答
824 次查看
zohanlin
Contributor IV

Hi Shivani Patel,

It doesn't work.

I think the reason is our system is used "systemd" to init.

So I modify "ExecStart" in /etc/systemd/system/getty.target.wants/serial-getty@ttymxc0.service,

Ex:  ExecStart=-/sbin/agetty -a root -8 -L %I 115200 $TERM

Thanks,

zohan

在原帖中查看解决方案

2 回复数
824 次查看
shivanipatel
Senior Contributor II

Hi, zohan Lin

Please check this thread for the solution.

Regards,

Shivani Patel

825 次查看
zohanlin
Contributor IV

Hi Shivani Patel,

It doesn't work.

I think the reason is our system is used "systemd" to init.

So I modify "ExecStart" in /etc/systemd/system/getty.target.wants/serial-getty@ttymxc0.service,

Ex:  ExecStart=-/sbin/agetty -a root -8 -L %I 115200 $TERM

Thanks,

zohan