~elementary-os/ubuntu-package-imports/ubiquity-bionic

« back to all changes in this revision

Viewing changes to d-i/source/console-setup/debian/console-setup-linux.keyboard-setup.sh.init

  • Committer: RabbitBot
  • Date: 2018-02-05 14:44:42 UTC
  • Revision ID: rabbitbot@elementary.io-20180205144442-vt0fvth7zus90wjh
Initial import, version 17.10.10

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
### BEGIN INIT INFO
 
3
# Provides:          keyboard-setup.sh
 
4
# Required-Start:    mountkernfs
 
5
# Required-Stop:
 
6
# X-Start-Before:    checkroot
 
7
# Default-Start:     S
 
8
# Default-Stop:
 
9
# X-Interactive:     true
 
10
# Short-Description: Set the console keyboard layout
 
11
# Description:       Set the console keyboard as early as possible
 
12
#                    so during the file systems checks the administrator
 
13
#                    can interact.  At this stage of the boot process
 
14
#                    only the ASCII symbols are supported.
 
15
### END INIT INFO
 
16
 
 
17
if [ -f /bin/setupcon ]; then
 
18
    case "$1" in
 
19
        stop|status)
 
20
        # console-setup isn't a daemon
 
21
        ;;
 
22
        start|force-reload|restart|reload)
 
23
            if [ -f /lib/lsb/init-functions ]; then
 
24
                . /lib/lsb/init-functions
 
25
            else
 
26
                log_action_begin_msg () {
 
27
                    echo -n "$@... "
 
28
                }
 
29
 
 
30
                log_action_end_msg () {
 
31
                    if [ "$1" -eq 0 ]; then
 
32
                        echo done.
 
33
                    else
 
34
                        echo failed.
 
35
                    fi
 
36
                }
 
37
            fi
 
38
            log_action_begin_msg "Setting up keyboard layout"
 
39
            if /lib/console-setup/keyboard-setup.sh; then
 
40
                log_action_end_msg 0
 
41
            else
 
42
                log_action_end_msg $?
 
43
            fi
 
44
            ;;
 
45
        *)
 
46
            echo 'Usage: /etc/init.d/keyboard-setup {start|reload|restart|force-reload|stop|status}'
 
47
            exit 3
 
48
            ;;
 
49
    esac
 
50
fi