From owner-freebsd-ports-bugs@FreeBSD.ORG Sun Mar 18 21:10:03 2007 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D651816A400 for ; Sun, 18 Mar 2007 21:10:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id B5E5513C4C7 for ; Sun, 18 Mar 2007 21:10:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l2ILA3ba025355 for ; Sun, 18 Mar 2007 21:10:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l2ILA3eY025354; Sun, 18 Mar 2007 21:10:03 GMT (envelope-from gnats) Resent-Date: Sun, 18 Mar 2007 21:10:03 GMT Resent-Message-Id: <200703182110.l2ILA3eY025354@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Rechistov Grigory Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 382C116A404 for ; Sun, 18 Mar 2007 21:09:52 +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 2730F13C48A for ; Sun, 18 Mar 2007 21:09:52 +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 l2IL9pLb026933 for ; Sun, 18 Mar 2007 21:09:51 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id l2IL4oRE022796; Sun, 18 Mar 2007 21:04:50 GMT (envelope-from nobody) Message-Id: <200703182104.l2IL4oRE022796@www.freebsd.org> Date: Sun, 18 Mar 2007 21:04:50 GMT From: Rechistov Grigory To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.0 Cc: Subject: ports/110492: Incorrect implementing of hal-system-power-shutdown-freebsd script in HAL X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Mar 2007 21:10:03 -0000 >Number: 110492 >Category: ports >Synopsis: Incorrect implementing of hal-system-power-shutdown-freebsd script in HAL >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Mar 18 21:10:03 GMT 2007 >Closed-Date: >Last-Modified: >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: I use Xfce 4.4 which uses HAL to shutdown the computer. But instead of calling "shutdown -p now" it does "shutdown -h now" which forces me to press power button. Some investigating (see http://www.freebsd.org/cgi/query-pr.cgi?pr=110465) showed that in the case when Xfce is configured with HAL it uses /usr/local/libexec/hal/scripts/hal-system-power-shutdown-freebsd script, which is directly executing "shutdown -h now". I think it would be more correct if there will be the "-p" option passed to shutdown. Or, there should be (already present?) a customiseable option so anyone could choose. >How-To-Repeat: Try to do a poweroff by methods which use HAL, e.g. Xfce 4.4 shutdown dialog. >Fix: Replace the /usr/local/libexec/hal/scripts/hal-system-power-shutdown-freebsd with something like this: #!/bin/sh unsupported() { echo "org.freedesktop.Hal.Device.SystemPowerManagement.NotSupported" >&2 echo "No shutdown command found" >&2 exit 1 } #Try for common tools if [ -x "/sbin/shutdown" ] ; then /sbin/shutdown -p now exit $? elif [ -x "/usr/sbin/shutdown" ] ; then /usr/sbin/shutdown -p now exit $? else unsupported fi >Release-Note: >Audit-Trail: >Unformatted: