Auto run a script on boot up

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Auto run a script on boot up

510件の閲覧回数
nikhil_sahu2
Contributor III

Hi 

I want to run a script when board boot up completed. this is a macchanger script.

I am using the imx6sx board and compiling the core-image-base image for filesystem. I read similar post on the community but i want to make sure on my board i do not have /etc/rc.local and /etc/inittab files.

 

Thanks in advance,

Nikhil

0 件の賞賛
返信
1 返信

499件の閲覧回数
b36401
NXP Employee
NXP Employee

You can place your script into /etc/init.d

root@imx8qmmek:/etc/init.d# cat test.sh
#!/bin/sh
echo test > /file.txt
root@imx8qmmek:/etc/init.d# ls -l test.sh
-rwxr-xr-x 1 root root 22 May 25 18:50 test.sh
root@imx8qmmek:/etc/init.d#

and add it into exact runlevel

root@imx8qmmek:/etc/init.d# runlevel
N 3
root@imx8qmmek:/etc/init.d# cd /etc/rc3.d/
root@imx8qmmek:/etc/rc3.d# ln -s ../init.d/test.sh S50test.sh
root@imx8qmmek:/etc/rc3.d#

0 件の賞賛
返信