autoload.sh 343 B

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