File: console-setup.sh

package info (click to toggle)
console-setup 1.244
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 28,124 kB
  • sloc: perl: 10,288; xml: 8,643; sh: 3,901; makefile: 777
file content (32 lines) | stat: -rwxr-xr-x 920 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/sh

do_configure=no
case "`uname 2>/dev/null`" in
    *FreeBSD*)
        do_configure=yes
        ;;
    *) # assuming Linux with udev

        # Skip only the first time (i.e. when the system boots)
        [ ! -f /run/console-setup/boot_completed ] || do_configure=yes
        mkdir -p /run/console-setup
        > /run/console-setup/boot_completed
        
        [ /etc/console-setup/cached_setup_terminal.sh \
              -nt /etc/default/keyboard ] || do_configure=yes
        [ /etc/console-setup/cached_setup_terminal.sh \
              -nt /etc/default/console-setup ] || do_configure=yes
        ;;
esac

if [ "$do_configure" = no ]; then
    :
else
    if [ -f /etc/default/locale ]; then
        # In order to permit auto-detection of the charmap when
        # console-setup-mini operates without configuration file.
        . /etc/default/locale
        export LANG
    fi
    setupcon --save
fi