home *** CD-ROM | disk | FTP | other *** search
/ chilidog.highland.cc.ks.us / chilidog.highland.cc.ks.us.zip / chilidog.highland.cc.ks.us / backup / bradford.20101108.etc.tar.gz / bradford.20101108.etc.tar / etc / init.d / boot.loadmodules < prev    next >
Text File  |  2006-03-22  |  929b  |  47 lines

  1. #! /bin/sh
  2. #
  3. # Copyright (c) 2002 SuSE Linux AG, Nuernberg, Germany. All rights reserved.
  4. #
  5. # File: /etc/init.d/boot.loadmodules
  6. # Author: Jiri Srain <jsrain@suse.cz>
  7. #
  8. ### BEGIN INIT INFO
  9. # Provides:          boot.loadmodules
  10. # Required-Start:    boot.udev
  11. # Required-Stop:
  12. # Default-Start:     B
  13. # Default-Stop:
  14. # Description:       load modules required to be loaded in specific order
  15. ### END INIT INFO
  16.  
  17. . /etc/rc.status
  18.  
  19. rc_reset
  20.  
  21. case "$1" in
  22.   start|restart)
  23.     # Read variable for sysconfig and load all mentioned modules
  24.     echo Loading required kernel modules
  25.     . /etc/sysconfig/kernel
  26.     for I in $MODULES_LOADED_ON_BOOT ; do
  27.     if ! modprobe -n $I > /dev/null 2>&1 ; then continue ; fi
  28.     modprobe $I;
  29.     done
  30.     rc_status -v1 -r
  31.    ;;
  32.   stop)
  33.     # skip / nothing to do
  34.     ;;
  35.   status)
  36.     rc_failed 4
  37.     rc_status -v
  38.     ;;
  39.   *)
  40.     echo "Usage: $0 {start|stop|status|restart}"
  41.     exit 1
  42.     ;;
  43. esac
  44.  
  45. rc_exit
  46.  
  47.