Skip to content
Snippets Groups Projects
Commit b66eacf3 authored by Florian Pose's avatar Florian Pose
Browse files

Script zum Entladen hinzugefügt.

parent 1140baf6
No related branches found
No related tags found
No related merge requests found
......@@ -36,6 +36,8 @@ insert_module()
fi
}
###############################################################################
# Parameter abfragen
if [ $# -eq 0 ]
then
......@@ -60,5 +62,6 @@ insert_module /tmp/ec_master.ko
insert_module /tmp/ec_8139too.ko ec_device_index=$1
echo "EtherCAT neu geladen."
exit 0
exit 0
\ No newline at end of file
###############################################################################
#!/bin/sh
###############################################################################
#
# Shell-Script zum Entladen des EtherCAT-Masters
#
# $Id$
#
###############################################################################
remove_module()
{
if lsmod | grep ^$1 > /dev/null
then
echo "Entlade Modul \"$1\"..."
rmmod $1 || exit -1
fi
}
insert_module()
{
name=`basename $1`
echo "Lade Modul \"$name\"..."
if ! modprobe $*
then
echo "Fehler beim Laden!"
exit -1
fi
}
###############################################################################
echo "Entlade EtherCAT..."
remove_module ec_8139too
remove_module ec_master
insert_module 8139too
echo "EtherCAT entladen."
exit 0
###############################################################################
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment