#! /bin/sh -e
# pre remove script for the Debian GNU/Linux modutils package

set -e

pkg=modutils

if [ "$1" = "remove" ]; then
	if [ -f /proc/ksyms ] ; then
		echo "WARNING: Kernel was compiled with modules support!"
		echo "Removing the modutils package could result in an unusable"
		echo "system if you use modules. Remove this package only if you"
		echo "are really sure of what you are doing."
		echo ""
		echo -n "If you really want to remove modutils type 'yes': "
		read ANSWER || exit 0
		if [ "$ANSWER" != "yes" ]; then
			echo "Aborting removal of modutils package"
			exit 1
		fi
	fi
fi

exit 0

