Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [tlug] Linux init 0 by powerbutton





> -----Original Message-----
> From: Godwin Stewart [mailto:gstewart@example.com] 
> Sent: Thursday, July 22, 2004 5:32 PM
> To: tlug@example.com
> Subject: Re: [tlug] Linux init 0 by powerbutton
> 
> 

> Having a keyboard and at least a graphics adaptor makes it 
> relatively painless to troubleshoot the sucker if the network 
> doesn't work for some reason.

The intention was to have a device that is unobstrusive and as easy to use
as a toaster. So my wife can switch it on and off when needed, without
typing or looking at a screen.  The Linux box will then be central storage
location for photos, mp3s and movies, as well as providing an rsync storage
point for my Mac Dual G5 and possibly print serving functions.

File system export will be mainly samba, maybe nfs.
 
> You'll want a machine which is recent enough to have a not 
> too buggy implementation of ACPI. About 1999 vintage or later 
> will do the trick. If the machine is closer to that vintage 
> than to present day technology you might need to add 
> "acpi=force" to the kernel command line. Make sure your BIOS 
> is set with ACPI support and so that the machine doesn't 
> power off immediately when you hit the power button (usually 
> it takes 4 seconds pressing on it).
> 
> You'll then need to add ACPI support to the kernel (but not 
> APM, they're mutually exclusive), with support for the power 
> button. This will generate an ACPI event whenever the power 
> button is pressed, in turn generating a line in the pseudo 
> file /proc/acpi/event.
> 
> Finally, you'll need acpid (supplied with most distros) which 
> reads events turning up in /proc/acpi/event and which runs 
> commands based on the type of event which happened and on a 
> configuration file in /etc/acpi/events.
> 
> I have this setup here:
> 
> /etc/acpi/events/default:
> 

>#event=button power.* 
> #action=/sbin/init 0
> 

I tailed the acpid log and saw the powerbutton event being registered and
completed, but the machine stayed on.  I made it work by changing the event
line to:

event=button/power

maybe different events are generated depending on Bios?

Anyway, now thanks to this addition, the system works completely as
intended!

Patrick


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links