shutdown-desktop: use poweroff for the Exec field in the shutdown.desktop
authorChen Qi <Qi.Chen@windriver.com>
Wed, 15 Jan 2014 07:10:14 +0000 (15:10 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 15 Jan 2014 12:25:21 +0000 (12:25 +0000)
commit41c744dcbd0e88e9750aeee6428bad316a02dc7c
tree7aacd8389f9b1f558367f07c437b84e89dbdb7fd
parent7df051f91f63a40155b78d531a9e326a1f779a92
shutdown-desktop: use poweroff for the Exec field in the shutdown.desktop

Use 'poweroff' instead of 'halt' for the Exec field in the shutdown.desktop.

The purpose of this patch is to make the 'shutdown' icon on on our sato
images work as expected for both sysvinit and systemd images. Previously,
the Exec field was 'halt'. The `halt' command could poweroff the system
in sysvinit images but it only could halt the system in systemd images.
The difference is due to the different implementations of the `halt' command.

In sysvinit, the `halt' command will effective execute `/sbin/init 0'. This
is for the compatibility with sysvinit 2.4, as stated in the comments of the
source code. In systemd, the `halt' command will effectively execute the
reboot(RB_HALT_SYSTEM).

As the 'shutdown' icon is expected to actually shutdown the system, we should
use poweroff instead of halt for its Exec field.

[YOCTO #4347]

(From OE-Core rev: c87d44a079c13a98734f9f726ec1b55d86793f8c)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-sato/shutdown-desktop/shutdown-desktop/shutdown.desktop