Fail* directories reorganized, Code-cleanup (-> coding-style), Typos+comments fixed.

git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1321 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
adrian
2012-06-08 20:09:43 +00:00
parent d474a5b952
commit 2575604b41
866 changed files with 1848 additions and 1879 deletions

View File

@ -0,0 +1,34 @@
#! /bin/bash
#
# A simple script to unload the kernel module and remove the old device nodes
# for it.
#
# Note:
# this must be run as root
#
# Check that root is executing us
if [ "$EUID" != "0" ]; then
echo "Sorry, you need to be root for this script to work."
echo "use 'su -c $0' and enter the root password when prompted"
exit -1
fi
# Check if the module is already loaded
if [ "x`grep plex86 /proc/devices`" != "x" ]; then
/sbin/rmmod plex86
# Check that it really went (OK - I'm paranoid)
if [ "x`grep plex86 /proc/devices`" != "x" ]; then
echo "The kernel module failed to unload!"
exit -1
fi
fi
# Remove any stale device nodes
# (extend for any minor devices created in the future)
rm -f /dev/plex86
# Job done - Give a little positive feedback
echo "The kernel module is no longer installed."
exit 0