#!/bin/bash

case "$1" in
  battery)
  ;;
  ac)
  ;;
  sleep)
    KVER=`uname -r`
    case "$KVER" in
      2.2.*|2.3.*|2.4.[1-7]|2.4.[1-7]-*)
	echo "Kernel does not support sleep, shutting down!" | /usr/bin/wall
	/sbin/shutdown -h now
      ;;
      *)
      ;;
    esac
  ;;
  wakeup)
  ;;
esac
exit 0
