home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / src / linux-headers-2.6.28-15 / Documentation / aoe / autoload.sh next >
Encoding:
Linux/UNIX/POSIX Shell Script  |  2008-12-24  |  339 b   |  18 lines

  1. #!/bin/sh
  2. # set aoe to autoload by installing the
  3. # aliases in /etc/modprobe.conf
  4.  
  5. f=/etc/modprobe.conf
  6.  
  7. if test ! -r $f || test ! -w $f; then
  8.     echo "cannot configure $f for module autoloading" 1>&2
  9.     exit 1
  10. fi
  11.  
  12. grep major-152 $f >/dev/null
  13. if [ $? = 1 ]; then
  14.     echo alias block-major-152 aoe >> $f
  15.     echo alias char-major-152 aoe >> $f
  16. fi
  17.  
  18.