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

cancel
Showing results for 
Search instead for 
Did you mean: 

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

1,156 Views
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 ?

Labels (3)
0 Kudos
2 Replies

132 Views
NXP TechSupport
NXP TechSupport

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 Kudos

132 Views
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 Kudos