#!/bin/sh

# This file is part of syscalltrack, a GNU/Linux kernel module and
# user space utilities for logging or modifying any system call    
# invocation.                                                      
#                                                                  
# Copyright (C) 2000-2002 Muli Ben-Yehuda, mulix@actcom.co.il      
# License: GNU General Public License                              

#
# $Id: sct_unload,v 1.3 2002/06/15 15:16:14 mulix Exp $
#

# This code is based upon code from the book "Linux Device
# Drivers" by Alessandro Rubini and Jonathan Corbet, published
# by O'Reilly & Associates. 

pre_module="syscall_hijack"
module="sct_rules"
device="sct"

# remove rules
/usr/sbin/sct_config delete

# invoke rmmod with all arguments we got
/sbin/rmmod $module $* || exit 1
/sbin/rmmod $pre_module $* || exit 1

# remove nodes
rm -f /dev/${device}[0-3] /dev/${device}_ctrl /dev/${device}_log

exit 0
