#!/bin/sh
#
# 99oss4-pm: Restart sound on suspend/resumt

case "$1" in
	hibernate|suspend)
		# We need to force unload in order
		# to quit applications that are using oss4..
		if which invoke-rc.d >/dev/null 2>&1; then
			invoke-rc.d oss4-base force-unload
		else
			/etc/init.d/oss4-base force-unload
		fi
		;;
	thaw|resume)
                if which invoke-rc.d >/dev/null 2>&1; then
                        invoke-rc.d oss4-base start
                else
                        /etc/init.d/oss4-base start
                fi
		;;
	*) exit $NA
		;;
esac


