aoe-discover.in 405 B

123456789101112131415161718
  1. #! /bin/sh
  2. # aoe-discover - trigger an AoE device discovery
  3. # Copyright 2007, Coraid, Inc., and licensed under GPL v.2.
  4. zero=`basename $0`
  5. f=@devdir@/discover
  6. if ! test -w $f; then
  7. echo 1>&2 $zero: $f does not exist or is not writeable.
  8. exit 1
  9. fi
  10. if ! test -c $f; then
  11. exec 1>&2
  12. echo "$zero: $f is not a character device file"
  13. echo "$zero: use udev or aoe-mkdevs to create it"
  14. exit 1
  15. fi
  16. echo > $f