summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichel Stam <m.stam@fugro.nl>2014-10-02 13:56:23 +0200
committerJohn Crispin <blogic@openwrt.org>2014-10-02 19:20:30 +0200
commit542c5374259fa5a4c4d009efd6b23b46d51cba15 (patch)
tree94f4e49810dc326a2a2e973226d783940fd7bf19
parent2c8176385a4f62b536303912ba508b9dc7931fad (diff)
downloadunitd-542c5374259fa5a4c4d009efd6b23b46d51cba15.tar
unitd-542c5374259fa5a4c4d009efd6b23b46d51cba15.zip
Fix 'reboot' message when the system is powering down
While executing a system halt (via the powerbutton or otherwise), the system displays rebooting, whereas it should display that it is going to turn off. Signed-off-by: Michel Stam <m.stam@fugro.nl>
-rw-r--r--state.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/state.c b/state.c
index c3d2303..c5d90b6 100644
--- a/state.c
+++ b/state.c
@@ -85,7 +85,10 @@ static void state_enter(void)
kill(-1, SIGKILL);
sync();
sleep(1);
- LOG("- reboot -\n");
+ if (reboot_event == RB_POWER_OFF)
+ LOG("- power down -\n");
+ else
+ LOG("- reboot -\n");
/* Allow time for last message to reach serial console, etc */
sleep(1);