#! /bin/sh
#
# hwtools	Tune up your hardware a bit
#

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

set -e

optimizehw() {
# Optimize interrupts. You might want to add parameters if you want
# to favor ttyS1 or ttyS0 or something else.
if command -v irqtune >/dev/null 2>&1; then
#   irqtune [PUT ARGS HERE]
#   echo -n " irqtune"
   true
fi

# configure QIC-02 interface
# see qic02conf(8)
# qic02conf --card= --port= --dma= --irq=
# echo -n " qic02conf"
}

case "$1" in
  start|restart|force-reload|reload)
	echo -n "Optimizing hardware..."
	optimizehw
	echo
	;;
  stop)
  	exit 0
	;;
  *)
	N=/etc/init.d/hwtools
	echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
	exit 1
	;;
esac

exit 0
