brltty.sh 668 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #! /bin/sh
  2. set -e
  3. # A fake /lib/brltty/brltty.sh for the initramfs. Rather than actually
  4. # starting brltty (which is problematic because brltty would have to be shut
  5. # down and restarted when switching out of early userspace), we just write
  6. # out a brltty.conf which will be copied over to the real root filesystem
  7. # later.
  8. brailleDriver=auto
  9. brailleDevice=usb:
  10. while [ "$1" ]; do
  11. case $1 in
  12. -b)
  13. brailleDriver="$2"
  14. shift 2
  15. ;;
  16. -d)
  17. brailleDevice="$2"
  18. shift 2
  19. ;;
  20. -*)
  21. shift 2
  22. ;;
  23. *)
  24. shift
  25. ;;
  26. esac
  27. done
  28. cat >/dev/.initramfs/brltty.conf <<EOF
  29. # Created by $0
  30. braille-driver $brailleDriver
  31. braille-device $brailleDevice
  32. EOF
  33. exit 0