Skip to contentSkip to conversation

shutdown-desktop: use poweroff for the Exec field in the shutdown.desktop

PATCH In review Chen Qi 3 participants 5 messages Jan 15, 2014

lore
Share & tools
lore

Chen Qi

author
#0 lore raw

cover shutdown-desktop: use poweroff for the Exec field in the shutdown.desktop

The following changes since commit e4c23f7bcb79072ea6028fbdf8f3f0dc17a63371:

dropbear: Refresh pam patch so it applies against recent version (2014-01-14 21:57:22 +0000)

are available in the git repository at:

git://git.pokylinux.org/poky-contrib ChenQi/shutdown-desktop
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/shutdown-desktop

Chen Qi (1):
shutdown-desktop: use poweroff for the Exec field in the
shutdown.desktop

 .../shutdown-desktop/shutdown.desktop              |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 1 line
1.7.9.5
author
#1 lore raw

PATCH 1/1 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_HATL_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]

---
 .../shutdown-desktop/shutdown.desktop              |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-sato/shutdown-desktop/shutdown-desktop/shutdown.desktop +1 -1
index 2726889..99bee4c 100644
@@ -3,7 +3,7 @@ Encoding=UTF-8
 Type=Application
 Name=Shutdown
 Comment=Close down the machine safely
-Exec=halt
+Exec=poweroff
 Icon=system-shutdown
 Terminal=false
 Categories=Utility;
Signature · 1 line
1.7.9.5
Reviewed-by on v1 1/1
#2 lore raw
Quoted 16 lines · Chen Qi

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_HATL_SYSTEM).

Quoted 8 lines

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

[YOCTO #4347]

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#3 lore raw
Quoted 1 line · Otavio Salvador

RB_HATL_SYSTEM

typo in the commit log :) (Spot by Mario)

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#4 lore raw
Quoted 7 lines · Otavio Salvador

On Wed, Jan 15, 2014 at 9:38 AM, Otavio Salvador
<[email protected]> wrote:
RB_HATL_SYSTEM

typo in the commit log :) (Spot by Mario)

I fixed this up as I merged it.

Cheers,

Richard