Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Jan 2006 11:44:38 -0800
From:      Nate Lawson <nate@root.org>
To:        Matthias Schmidt <schmidtm@mathematik.uni-marburg.de>
Cc:        "freebsd-acpi@freebsd.org" <freebsd-acpi@freebsd.org>
Subject:   Re: Invoke script by power button
Message-ID:  <43D13DA6.5080104@root.org>
In-Reply-To: <20060120163456.GD18939@staatsfeind.org>
References:  <43D0F78E.9030505@freenet.de> <20060120163456.GD18939@staatsfeind.org>

next in thread | previous in thread | raw e-mail | index | archive | help

Matthias Schmidt wrote:
> Moin,
> 
> * Hendrik Koch wrote:
> 
>>Hi,
>>
>>i am looking for a way to invoke a shell script when i press the
>>power-button.
>>The script should do some custom tasks and then "shutdown -p now".
> 
> 
> Look into /etc/rc.shutdown.

Yeah, that's a good place since the system won't actually shut down 
until the script is done executing.  You can get power button notifies 
from devd (see devd.conf) but the system will continue processing the 
shutdown without waiting.

-- 
Nate



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?43D13DA6.5080104>