console-setup.sh 920 B

1234567891011121314151617181920212223242526272829303132
  1. #!/bin/sh
  2. do_configure=no
  3. case "`uname 2>/dev/null`" in
  4. *FreeBSD*)
  5. do_configure=yes
  6. ;;
  7. *) # assuming Linux with udev
  8. # Skip only the first time (i.e. when the system boots)
  9. [ ! -f /run/console-setup/boot_completed ] || do_configure=yes
  10. mkdir -p /run/console-setup
  11. > /run/console-setup/boot_completed
  12. [ /etc/console-setup/cached_setup_terminal.sh \
  13. -nt /etc/default/keyboard ] || do_configure=yes
  14. [ /etc/console-setup/cached_setup_terminal.sh \
  15. -nt /etc/default/console-setup ] || do_configure=yes
  16. ;;
  17. esac
  18. if [ "$do_configure" = no ]; then
  19. :
  20. else
  21. if [ -f /etc/default/locale ]; then
  22. # In order to permit auto-detection of the charmap when
  23. # console-setup-mini operates without configuration file.
  24. . /etc/default/locale
  25. export LANG
  26. fi
  27. setupcon --save
  28. fi