[EDIT]
See last method first
[END EDIT]
You could try creating a script and adding it to init.d…
Create a script in /etc/init.d called something like my-tvcard:
sudo gedit /etc/init.d/my-tvcard
When gedit opens a blank file, add these 5 lines to it:
#!/bin/bash
# My INIT script to unload the dvb drivers then reload with correct parameters
rmmod em28xx_dvb
rmmod em28xx
modprobe em28xx card=11 i2c_scan=1
and SAVE the file.
Now make it executable:
sudo chmod +x /etc/init.d/my-tvcard
Then update-rc.d to add it to all default runlevels:
sudo update-rc.d my-tvcard defaults
Now try rebooting, and see if the card works.
If it DOESN’T work, you can remove the changes with:
sudo update-rc.d my-tvcard remove
then delete the file you created with:
sudo rm /etc/init.d/my-tvcard
Another method would be to add the commands to rc.local:
sudo gedit /etc/rc.local
Add these 3 lines:
rmmod em28xx_dvb
rmmod em28xx
modprobe em28xx card=11 i2c_scan=1
just above the:
exit 0
line.
so the end reads:
rmmod em28xx_dvb
rmmod em28xx
modprobe em28xx card=11 i2c_scan=1
exit 0
SAVE the file, and reboot.
Yet another method (but less secure… ie. it contains your password)…
Make a hidden executable script in your home folder called .my-tvcard.sh:
sudo gedit ~/.my-tvcard.sh
containing the text:
#!/bin/bash
echo "YOUR LOGIN PASSWORD" | sudo -S rmmod em28xx_dvb
echo "YOUR LOGIN PASSWORD" | sudo -S rmmod em28xx
echo "YOUR LOGIN PASSWORD" | sudo -S modprobe em28xx card=11 i2c_scan=1
(obviously you need to add YOUR password)
SAVE the file.
Make it executable with:
chmod +x ~/.my-tvcard.sh
Now, go to System>Preferences>StartUp Applications, click Add and make the fields read -
Name: my-tvcard (or whatever you want)
Command: /home/username/.my-tvcard.sh
Comment: DVB-TV driver script (or whatever you want)
(change username for YOUR username)
And click Add
Now reboot.
Probably the easiest method…
Instead of adding the script as a startup application, you could add it to the command line contained in the kaffeine launcher… so the script runs the commands prior to loading kaffiene.
ie. make the script read:
#!/bin/bash
echo "YOUR LOGIN PASSWORD" | sudo -S rmmod em28xx_dvb
echo "YOUR LOGIN PASSWORD" | sudo -S rmmod em28xx
echo "YOUR LOGIN PASSWORD" | sudo -S modprobe em28xx card=11 i2c_scan=1
kaffeine
make it executable.
and have the kaffeine “launcher” (shortcut) point to the script instead of directly at kaffeine.