#! /bin/sh
### BEGIN INIT INFO
# Provides:          lidhack
# Required-Start:
# Required-Stop:
# Default-Start:
# Default-Stop:      0
# Short-Description: Execute a lidhack command.
# Description:
### END INIT INFO

# install hack like:
# 
# wget -NP /etc/init.d http://kanotix.com/files/fix/lidhack
# chmod +x /etc/init.d/lidhack
# insserv lidhac

NETDOWN=yes

PATH=/sbin:/usr/sbin:/bin:/usr/bin

. /lib/lsb/init-functions

do_stop () {
	log_action_msg "Will now disable LID"
	echo LID > /proc/acpi/wakeup
}

case "$1" in
  start)
	# No-op
	;;
  restart|reload|force-reload)
	echo "Error: argument '$1' not supported" >&2
	exit 3
	;;
  stop)
	do_stop
	;;
  *)
	echo "Usage: $0 start|stop" >&2
	exit 3
	;;
esac

:
