#!/bin/sh
#
# chkconfig: 0 1 99
# description: This deals with final shutdown in power out situations
# config: /etc/ups/

# since this would mostly duplicate whats in the ups script,
# the extra code has been added to that script - this just
# calls that appropriately

# See how we are called.
case "$1" in
  start)
	# we need to do a powerdown (strange idea of "start" here)
	/etc/rc.d/init.d/ups powerdown
	;;
  stop)
	# stop has no meaning to this script, however its supported
	# because it will be called on some state transitions
	;;
  *)
	echo "Usage: upspowerdown {start|stop}"
	exit 1
esac
