Halt or reboot ...

Hi,
I have a BBB with OLed screen,
I would like to display a message when the system halt but not if reboot ...
Is there a way to know if the system halt or reboot ?
Thanks.

Hi Philippe!

Is there a way to know if the system halt or reboot ?

There’re several ways, depending on the operating system working on your board. Usually current boards ship with Debian Linux. Check the output of command

`
uname -a

`

It shoud look like

Linux beaglebone 3.8.13-bone71 #1 SMP Tue Mar 17 18:07:44 UTC 2015 armv7l GNU/Linux

In that case boot and halt process is managed by systemd. Find details at Wikipedia page and the links at the bottom.

BR

whith : runlevel | cut -d ' ' -f2 ....
0 = halt
6 = reboot