From: Cesar M. <mi...@df...> - 2000-07-12 03:38:01
|
Hi Keith! Forgot about this msg. Nicholas Hart sent me an init.d script (usable in redhat systems) to start/stop the rio500 modules. Where should we put it? Any ideas? cesar ,------------------------------------------------------------------. | Departamento de Fisica, FCEyN e-mail: mi...@df... | | Universidad de Buenos Aires phone : 54-1-576-3390 ext 823 | | Pabellon 1, Ciudad Universitaria fax : 54-1-576-3357 | | Buenos Aires, (1428) Argentina | | Home Page: http://www.df.uba.ar/~miquel | `------------------------------------------------------------------' ---------- Forwarded message ---------- Date: Thu, 6 Jul 2000 06:55:53 -0700 From: Nicholas Hart <ni...@ni...> To: mi...@df... Subject: a rio500 initd script Hello, I thought I'd submit this script for starting, stopping and checking the status of the rio & usb modules for Redhat 6.x. I find it pretty useful. Perhaps there is some place you would like to post it. Feel free to make whatever modifications you like. #!/bin/sh # # rio500 This shell script takes care of starting and stopping # rio500 usb modules # # Source function library. . /etc/rc.d/init.d/functions # Source networking configuration. . /etc/sysconfig/network MOD_DIR=/lib/modules/`uname -r`/usb USB_MOD=usb-ohci EXITCODE=0 # See how we were called. case "$1" in start) # Start daemons. echo -n "Starting rio500: " insmod $MOD_DIR/usbcore.o insmod $MOD_DIR/$USB_MOD.o insmod $MOD_DIR/rio500.o echo if [ "`lsmod|grep rio500`" = "" ] ; then # lsmod couldn't find the rio500 module EXITCODE=3 fi ;; stop) # Stop daemons. echo -n "Shutting down irmanager: " rmmod rio500 rmmod $USB_MOD rmmod usbcore echo ;; status) if [ "`lsmod|grep rio500`" = "" ] ; then # lsmod couldn't find the rio500 module echo "rio500 is NOT loaded" EXITCODE=3 else echo "rio500 is loaded" fi ;; restart|reload) $0 stop $0 start ;; *) echo "Usage: rio500 {start|stop|status|restart|reload}" exit 1 esac exit $EXITCODE |