home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / etc / init.d / console-setup < prev    next >
Encoding:
Text File  |  2013-01-05  |  1.3 KB  |  63 lines

  1. #!/bin/sh
  2. ### BEGIN INIT INFO
  3. # Provides:          console-setup
  4. # Required-Start:    $remote_fs
  5. # Required-Stop:
  6. # Should-Start:      console-screen kbd
  7. # Default-Start:     S
  8. # Default-Stop:
  9. # X-Interactive:     true
  10. # Short-Description: Set console font and keymap
  11. ### END INIT INFO
  12.  
  13. set -e
  14.  
  15. # This script is used jointly by console-setup and console-setup-mini.
  16. # It belongs to keyboard-configuration because it is forbidden two
  17. # different packages to share common configuration file.
  18.  
  19. test -f /bin/setupcon || exit 0
  20.  
  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.  
  28. if [ -f /lib/lsb/init-functions ]; then
  29.     . /lib/lsb/init-functions
  30. else
  31.     log_action_begin_msg () {
  32.     echo -n "$@... "
  33.     }
  34.  
  35.     log_action_end_msg () {
  36.     if [ "$1" -eq 0 ]; then 
  37.         echo done.
  38.     else
  39.         echo failed.
  40.     fi
  41.     }
  42. fi
  43.  
  44. case "$1" in
  45.     stop|status)
  46.         # console-setup isn't a daemon
  47.         ;;
  48.     start|force-reload|restart|reload)
  49.     log_action_begin_msg "Setting up console font and keymap"
  50.     if setupcon --save; then
  51.         log_action_end_msg 0
  52.     else
  53.         log_action_end_msg $?
  54.     fi
  55.     ;;
  56.     *)
  57.         echo 'Usage: /etc/init.d/console-setup {start|reload|restart|force-reload|stop|status}'
  58.         exit 1
  59.         ;;
  60. esac
  61.  
  62. exit 0
  63.