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.20120521.etc.tar.gz / bradford.20120521.etc.tar / etc / init.d / boot.device-mapper < prev    next >
Text File  |  2006-04-22  |  787b  |  43 lines

  1. #! /bin/sh
  2. #
  3. # Copyright (c) 2001 SuSE GmbH Nuernberg, Germany.  All rights reserved.
  4. #
  5. # /etc/init.d/boot.device-mapper
  6. #
  7. ### BEGIN INIT INFO
  8. # Provides:          boot.device-mapper
  9. # Required-Start:    boot.udev boot.rootfsck
  10. # X-UnitedLinux-Should-Start: boot.scsidev
  11. # Required-Stop:
  12. # Default-Start:     B
  13. # Default-Stop:
  14. # Description:       activate device mapper
  15. ### END INIT INFO
  16.  
  17. . /etc/rc.status
  18.  
  19. rc_reset
  20.  
  21. case "$1" in
  22.   start)
  23.     echo "Activating device mapper..."
  24.     lsmod | grep "^dm[-_]mod[     ]" >/dev/null 2>&1 || modprobe dm-mod
  25.     rc_status -v -r
  26.     ;;
  27.     stop)
  28.         # module unloading seems to be uneliable in kernel 2.6
  29.     # rmmod dm-mod 
  30.     # rc_status -v
  31.     ;;
  32.     status)
  33.     rc_failed 4
  34.     rc_status -v
  35.     ;;
  36.     *)
  37.     echo "Usage: $0 {start|stop|status}"
  38.     exit 1
  39.     ;;
  40. esac
  41.  
  42. rc_exit
  43.