If you go to /proc/apm you should find a file listing the different buttons... I've never done this with apm, but using acpi it's under
/proc/acpi/wakeup
To change the state, you run this command as root:
Code:
echo 'LID disabled' > /proc/acpi/wakeup
Poke around in /proc and you should find the relative file.
--Shade