简体   繁体   English

初始化服务未在yocto中运行..找不到pidof错误

[英]Init service not running in yocto.. pidof not found error

I am trying to run a service on startup in Yocto image. 我正在尝试在Yocto映像的启动中运行服务。 My hardware is x64 and I copied service recipe from the meta-skeleton layer. 我的硬件是x64,我从meta-skeleton层复制了服务配方。

When I flashed the latest image with this service, and looked at "ps", the service was not running. 当我使用该服务刷新最新映像并查看“ ps”时,该服务未运行。

I manually jump to init.d directory and executed ./infusion start command and I got the following error: 我手动跳到init.d目录并执行./infusion start命令,出现以下错误:

./infusion: line 192: pidof: not found
ERROR: command pidof not found
Starting infusion ...

How to add pidof utility to my image. 如何将pidof实用程序添加到我的图像。 I am generating core-image-minimal image. 我正在生成核心图像最小图像。

Thanks for your time. 谢谢你的时间。 Appreciate your efforts.. 感谢您的努力。

I think the default path is not set so its not able to find it please specify it using absolute path in the script where you are calling it eg 我认为未设置默认路径,因此无法找到它,请在调用它的脚本中使用绝对路径指定它,例如

/bin/pidof

other option is to add 另一种选择是添加

PATH=/bin:/sbin:/usr/sbin:/usr/bin

at top of your init script might help 初始化脚本顶部的内容可能会有所帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM