gpib 514 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #! /bin/sh -e
  2. # configure the GPIB driver
  3. PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin
  4. gpib_start()
  5. {
  6. chmod 666 /dev/gpib*
  7. gpib_config
  8. }
  9. gpib_stop()
  10. {
  11. chmod 660 /dev/gpib*
  12. }
  13. gpib_status()
  14. {
  15. ls -l /dev/gpib*
  16. }
  17. case "$1" in
  18. start)
  19. gpib_start
  20. ;;
  21. restart|force-reload|reload)
  22. gpib_stop
  23. gpib_start
  24. ;;
  25. stop)
  26. gpib_stop
  27. ;;
  28. status)
  29. gpib_status
  30. ;;
  31. *)
  32. echo "Usage: $0 {start|stop|restart|reload|force-reload}"
  33. exit 1
  34. ;;
  35. esac
  36. exit 0