Halt or reboot ...

21 views
Skip to first unread message

Philippe Frossard

unread,
Aug 5, 2016, 12:13:28 PM8/5/16
to beagl...@googlegroups.com
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.

--
Philippe Frossard

TJF

unread,
Aug 6, 2016, 12:52:59 PM8/6/16
to BeagleBoard, philippe...@free.fr
Hi Philippe!


Am Freitag, 5. August 2016 18:13:28 UTC+2 schrieb philippe.frossard:
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

Philippe Frossard

unread,
Aug 8, 2016, 10:05:28 AM8/8/16
to TJF, BeagleBoard
whith : runlevel | cut -d ' ' -f2 ....
0 = halt
6 = reboot

Le 06/08/2016 à 18:52, TJF a écrit :
> Hi Philippe!
>
> Am Freitag, 5. August 2016 18:13:28 UTC+2 schrieb philippe.frossard:
>
> 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
>
> |
> Linuxbeaglebone 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 <https://en.wikipedia.org/wiki/Systemd> and
> the links at the bottom.
>
> BR
>

--
Philippe Frossard

Reply all
Reply to author
Forward
0 new messages