123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- #!/bin/sh
- load_pvr()
- {
-
-
-
- if ! /sbin/modprobe -q pvrsrvkm; then
- echo "Module pvrsrvkm failed to load. Retrying."
- if [ -z $depmod_has_been_run ]; then
- if [ -e /sbin/depmod ]; then
- echo "Running /sbin/depmod"
- /sbin/depmod && depmod_has_been_run=1
- fi
- fi
- if ! /sbin/modprobe -q pvrsrvkm; then return; fi
- fi
-
- if ! /usr/bin/pvrsrvctl --start --no-module; then return; fi
-
-
-
- if ! /sbin/modprobe -q bc_example ; then
- echo "Module bc_example failed to load. Retrying."
- if [ -z $depmod_has_been_run ]; then
- if [ -e /sbin/depmod ]; then
- echo "Running /sbin/depmod"
- /sbin/depmod && depmod_has_been_run=1
- fi
- fi
- if ! /sbin/modprobe -q bc_example ; then echo "Continuing to load PowerVR services"; bc_example_failed=1; fi
- fi
-
-
-
-
- if [ -z $bc_example_failed ]; then
- bcd_maj=`grep "bc_example$" /proc/devices | cut -b1,2,3`
- /bin/rm -f /dev/bc_example
- /bin/mknod /dev/bc_example c $bcd_maj 0
- /bin/chmod 666 /dev/bc_example
- fi
- echo "Loaded PowerVR consumer services."
- return 0;
- }
- unload_pvr()
- {
-
-
-
- if rmmod bc_example; then :; else echo "Warning: Could not unload bc_example"; fi
-
-
- if rmmod pvrsrvkm; then :; else return 1; fi
-
- echo "Unloaded PowerVR consumer services."
- return 0;
- }
- case "$1" in
- "start")
- load_pvr
- ;;
- stop)
- if ! unload_pvr; then
- echo "Couldn't unload modules" >&2;
- fi
- ;;
- reload|restart)
- if unload_pvr; then
- load_pvr
- else
- echo "Couldn't unload modules" >&2;
- fi
- ;;
- *)
- echo "$0: unknown argument $1." >&2;
- ;;
- esac
|