How to add the initscript and run during the devce boot on imx6ul

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

How to add the initscript and run during the devce boot on imx6ul

3,150 次查看
chaochengdo
Contributor I

I want to add one script file pvs6-startLTE.sh in the /etc/init.d/ and can be run by rcS.d the during boot up.
I follow the post https://community.nxp.com/message/652816 to add the code and file.
After load rootfs into device, I can see the script file in the /etc/init.d/pvs6-startLTE.sh and /etc/rcS.d/S99pvs6-startLTE.sh

#ls -all
#lrwxrwxrwx 1 root root 26 Jan 1 1970 S99pvs6-startLTE.sh -> ../init.d/pvs6-startLTE.sh

But the script can not run during the boot.
The console message will show as below.
[ SKIP ] Ordering cycle found, skipping pvs6-startLTE.service
How do I solve this problem ?

标签 (3)
0 项奖励
回复
2 回复数

2,126 次查看
b36401
NXP Employee
NXP Employee

Please try to add a link to your script into exact runlevel, /etc/rc5.d/ for example.
You can recognize exact runlevel with "runlevel" utility.

0 项奖励
回复

2,126 次查看
chaochengdo
Contributor I

I check some status from below systemctl command. 

root@imx6ulevk:~# systemctl status pvs6-startLTE.service
♂ pvs6-startLTE.service
Loaded: loaded (/etc/init.d/pvs6-startLTE.sh; generated; vendor preset: enabl
Active: inactive (dead)
Docs: man:systemd-sysv-generator(8)

root@imx6ulevk:~# systemctl is-enabled pvs6-startLTE.service
generated
root@imx6ulevk:~# systemctl is-active pvs6-startLTE.service
inactive

And I want to enable it but fail. 

root@imx6ulevk:~# systemctl enable pvs6-startLTE.service
Failed to enable unit: Unit /run/systemd/generator.late/pvs6-startLTE.service is transient or generated.

Please help me for why I cannot enable it ?

0 项奖励
回复