#!/bin/bash
#
# Install Script for the  USB Smartcard reader series.
#
#
# check if module for this Kernel version exists
#
echo 
echo Uninstalling Rockey4 driver
echo

#check whether the current user is root
if test $(id -ur) != 0; then
	echo
	echo "You should logon as root user!"
	echo 
	exit -1
fi


if [ -f Makefile ]; then
 make uninstall; make clean
 if [ $? != 0 ]; then
  echo Could not uninstall driver-module, exiting
  exit -1
 fi
 rmmod rockey
fi

echo
echo "uninstall finished"
