diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2010-04-01 11:24:35 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2010-04-01 11:24:35 +0200 |
commit | e258bb27135e755ea57c6d1e83e298d640913fc1 (patch) | |
tree | 0ae705962f55de0a13318168a6589c14d6f408e5 /bttv/experimental/update | |
parent | bb218f6ab257e1ced214fcc815a2357313ac1e38 (diff) |
v2.14
Diffstat (limited to 'bttv/experimental/update')
-rw-r--r-- | bttv/experimental/update | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/bttv/experimental/update b/bttv/experimental/update new file mode 100644 index 0000000..b23592c --- /dev/null +++ b/bttv/experimental/update @@ -0,0 +1,40 @@ +#!/bin/sh + +if test "$UID" = "0"; then + # running as root anyway, don't need sudo + INSMOD="/sbin/insmod" + RMMOD="/sbin/rmmod" +else + INSMOD="sudo /sbin/insmod" + RMMOD="sudo /sbin/rmmod" +fi + +# handy functions for rmmod/insmod +function xrmmod () { + grep -qe "^$1" /proc/modules || return + echo rmmod $1 + $RMMOD $1 || exit 1 +} +function xinsmod () { + echo insmod $* + $INSMOD -f $* || exit 1 +} + +# prepare for crashing the box -- flush dirty buffers +sync; sleep 1; sync + +# kill old modules ... +xrmmod tuner +xrmmod i2c-dev +xrmmod bttv +xrmmod algo-bit +xrmmod i2c +xrmmod videodev + +# ... and load the new ones +xinsmod videodev +xinsmod i2c.o +xinsmod algo-bit.o test=1 scan=0 +xinsmod tuner debug=1 type=5 +xinsmod bttv radio=1 vidmem=0xff0 + |