From nobody@FreeBSD.org  Sun Mar 18 07:18:56 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id E146416A404
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 18 Mar 2007 07:18:56 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [69.147.83.33])
	by mx1.freebsd.org (Postfix) with ESMTP id D2C1113C457
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 18 Mar 2007 07:18:56 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id l2I7IuJj060157
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 18 Mar 2007 07:18:56 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id l2I7DsaF053333;
	Sun, 18 Mar 2007 07:13:54 GMT
	(envelope-from nobody)
Message-Id: <200703180713.l2I7DsaF053333@www.freebsd.org>
Date: Sun, 18 Mar 2007 07:13:54 GMT
From: Rechistov Grigory<ggg_mail@inbox.ru>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Xfce4.4 does not do power off when shutting down a computer
X-Send-Pr-Version: www-3.0

>Number:         110465
>Category:       ports
>Synopsis:       Xfce4.4 does not do power off when shutting down a computer
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    oliver
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 18 07:20:06 GMT 2007
>Closed-Date:    Sun Mar 18 19:01:50 GMT 2007
>Last-Modified:  Sun Mar 18 19:01:50 GMT 2007
>Originator:     Rechistov Grigory
>Release:        6.2-STABLE
>Organization:
>Environment:
FreeBSD ipv82-180.rt.private.mipt.ru 6.2-STABLE FreeBSD 6.2-STABLE #0: Tue Feb 20 17:54:12 MSK 2007     root@ipv82-180.rt.private.mipt.ru:/usr/obj/usr/src/sys/DELL_v5  i386

>Description:
When I wish to turn my box off in Xfce 4.4 I call the main menu, choose "Exit" then choose "Turn off". The system goes down then, all processes receive kill signals, disk caches flush etc, but then a message appears: "The system is halted now. Press any key to reboot" instead of final power switching off. So I have to press power button or to reboot the machine.

My computer supports powering off, and when I execute "shutdown -p now" manually everything is correct. Seems like Xfce uses "shutdown -h now" command which is not what is intended to happen.
>How-To-Repeat:
Select "Turn off" option in the shutdown dialog of main menu of Xfce.
>Fix:

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->oliver 
Responsible-Changed-By: oliver 
Responsible-Changed-When: Sun Mar 18 07:39:17 UTC 2007 
Responsible-Changed-Why:  
xfce is mine 

http://www.freebsd.org/cgi/query-pr.cgi?pr=110465 
State-Changed-From-To: open->feedback 
State-Changed-By: oliver 
State-Changed-When: Sun Mar 18 07:49:54 UTC 2007 
State-Changed-Why:  
wairing for feedback 

http://www.freebsd.org/cgi/query-pr.cgi?pr=110465 

From: Oliver Lehmann <oliver@FreeBSD.org>
To: bug-followup@FreeBSD.org, ggg_mail@inbox.ru
Cc:  
Subject: Re: ports/110465: Xfce4.4 does not do power off when shutting down
 a computer
Date: Sun, 18 Mar 2007 08:48:44 +0100

 Can you please send me the output of
 
  strings /usr/local/libexec/xfsm-shutdown-helper | grep shutdown
 
 -- 
  Oliver Lehmann
   http://www.pofo.de/
   http://wishlist.ans-netz.de/

From: Oliver Lehmann <oliver@FreeBSD.org>
To: bug-followup@FreeBSD.org, ggg_mail@inbox.ru
Cc:  
Subject: Re: ports/110465: Xfce4.4 does not do power off when shutting down
 a computer
Date: Sun, 18 Mar 2007 15:57:55 +0100

 Hi,
 
 since there is no "shutdown -h" located in your shutdown-helper binary I
 wonder where the -h should come from. Can you please replace your
 shutdown binary with a shellscript which logs its arguments?
 
 mv /sbin/shutdown /sbin/shutdown.org
 
 then recreate /sbin/shutdown as a textfile wit the following content:
 
 #!/bin/sh
 
 echo $* >> /tmp/shutdownargs
 exit 0
 
 After creating the file provide the correct modes so it can be executed:
 
 chmod 755 /tmp/shutdownargs
 
 Now start xfce, and press the "Shut Down" Button. After that, please send
 me the content of /tmp/shutdownargs.
 
 -- 
  Oliver Lehmann
   http://www.pofo.de/
   http://wishlist.ans-netz.de/
State-Changed-From-To: feedback->closed 
State-Changed-By: oliver 
State-Changed-When: Sun Mar 18 18:59:31 UTC 2007 
State-Changed-Why:  
hal uses "shutdown -h" for shutting down a system. xfce4-session-logout 
uses hal if existent. "shutdown -h" seems to be the default for the 
HAL call "Shutdown" - see other hal-system-power-shutdown implementations 
(search google) 

For our implementation see 
/usr/local/libexec/hal/scripts/hal-system-power-shutdown-freebsd 

xfsm-shutdown-helper would use shutdown -p but this is only used if HAL 
is not installed on the system. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=110465 
>Unformatted:
