Video editing/Ieee1394 starting script
İçindekiler
Principe
The ohci1394 and ieee1394 starts automatically when the ieee1394 card is detected. the other modules (raw, dv, video) are loaded when you inserts the camcorder, but this don't works with all openSUSE versions (the script was written for SUSE Linux 10.0 and was no more necessary for 10.1).
The script
The following script can be inserted anywhere, but probably better in /etc/init.d.
It has been freely adapted from lm_sensors.
It's enough to copy/paste from this page to create the script. Don't forget to make it executable.
#!/bin/sh # ### BEGIN INIT INFO # Provides: 1394 # Description: load/unload the ieee1394 modules. ### END INIT INFO # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # Source function library. #. /etc/rc.status start() { echo $"Starting up ieee1394: " /sbin/modprobe raw1394 &>/dev/null /sbin/modprobe dv1394 &>/dev/null /sbin/modprobe video1394 &>/dev/null echo $"Result:" lsmod | grep 1394 } stop() { echo $"Starting up ieee1394: " /sbin/modprobe -r raw1394 &>/dev/null /sbin/modprobe -r dv1394 &>/dev/null /sbin/modprobe -r video1394 &>/dev/null echo $"Result:" lsmod | grep 1394 } restart() { stop start } # See how we were called. case "$1" in start) start ;; stop) stop ;; *) echo "Usage: 1394 {start|stop}" exit 1 esac
How to use it
1394 start
ou
1394 stop
It's simpler with:
peter-suse:/usr/sbin # ln -s /etc/init.d/1394 rc1394
Restriction
As it, the script can be run only by root. It can be run on start or you can make it usable by others, but this is an other problem (see sudo).