This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SK-TDA4VM: Power-on scripts

Part Number: SK-TDA4VM

Hi team,

Here's an issue from the customer may need your help:

The customer created a script for init.sh in the /etc/profile.d/ directory because they needed to run an application automatically after the board started.

But finally you will see a lot of programs when the board started. The customer suspects that the post-boot script will execute many times, while they just want it to execute once since the multiple starts will cause the program to be abnormal.

The content of init.sh is to execute the program:

/home/root/FG5_DEV

Thanks.

Best Regards,

Cherry

  • Hi Cherry,

    Scripts in profile.d will get executed every time a user logs into the system, which could be the reason why the customer is seeing the application being started multiple times (for example, the script will start every time when logging in through UART, or SSH).

    Scripts put in /etc/init.d will be executed once every boot, so the recommendation would be to:

    1. Place your script in /etc/init.d. E.g. mv foo.sh /etc/init.d
    2. chmod +x /etc/init.d/foo.sh
    3. chown root /etc/init.d/foo.sh
    4. update-rc.d foo.sh defaults

    Above steps should move the script, update permissions for running as a executable, and let the system know that it should be executed on boot.

    Regards,

    Takuma