examples/test_copcican_comedi/insert.sh
author Christian Taedcke <hacking@taedcke.com>
Tue, 12 Jun 2012 01:06:38 +0200
changeset 736 a915095ab9e7
parent 629 b9274b595650
permissions -rw-r--r--
Adapted path to xeno-config.
Changed parameters to xeno-config.
629
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
     1
#!/bin/sh
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
     2
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
     3
module="test_copcican_comedi"
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
     4
device="test_copcican_comedi"
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
     5
mode="664"
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
     6
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
     7
# insert neccessary modules
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
     8
/sbin/insmod ../../drivers/can_copcican_comedi/can_copcican_comedi.ko
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
     9
/sbin/insmod ../../src/canfestival.ko
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    10
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    11
# insert module with all arguments we got
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    12
# and use a pathname, as newer modutils don't look in . by default
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    13
/sbin/insmod ./$module.ko $* || exit 1
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    14
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    15
# stale nodes and device files are created by COMEDI
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    16
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    17
rmmod $module
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    18
rmmod canfestival
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    19
rmmod can_copcican_comedi