您好,
我因为需要开发板启动后去自动运行一个应用程序,我在/etc/profile.d/目录下创建了一个init.sh的脚本
但是最后开发板启动我会看见很多个程序,初步判断是开机自启动脚本会执行很多次,我该怎么解决,我希望它就执行一次,多次启动导致我的程序异常

init.sh的内容很简单:
/home/root/FG5_DEV
就是执行一下程序
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.
您好,我们把您的问题升级到英文论坛给美国工程师看下,链接如下:
您好,
profile.d 中的脚本将在用户每次登录系统时执行,所以这可能是您看到应用程序多次启动的原因(例如,脚本将在通过 UART 或 SSH 登录时每次启动)。
每次启动时都将执行放入/etc/init.d 中的脚本,因此建议如下:
以上步骤应移动脚本、更新作为可执行文件运行的权限,并告知系统应在启动时执行该脚本。