Identify boot ,shutdown or reboot in linux shell script yocto linux

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Identify boot ,shutdown or reboot in linux shell script yocto linux

2,119 次查看
vijith_g1
Contributor II

Hi,

In my current project I need to identify running jobs for detecting the system is in reboot or shutdown level.

Using systemctl I knows how to identify the jobs. But in Digi yocto linux i could not find systemctl .Please let me know how can I identify in linux script whether the system is in boot , restart or shutdown level.

Thanks & Regards

Vijith G

标签 (4)
0 项奖励
回复
2 回复数

2,039 次查看
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi vijith G,

 Different yocto version has big change.Can you tell me the yocto version you used?

Regards,

zhiming

0 项奖励
回复

2,039 次查看
karangajjar
Senior Contributor II

Hi vijith G,

Are you trying to get the run-level of the system?

For that you can try using below commands:

$ runlevel

or

$ who -r

Regards,

Karan Gajjar