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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

1,661 Views
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

Labels (4)
0 Kudos
2 Replies

1,581 Views
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 Kudos

1,581 Views
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