#!/bin/bash
# Load gparted live functions
. /usr/share/gparted/bin/gl-functions

[ -e /etc/gparted-live/gparted-live.conf ] && . /etc/gparted-live/gparted-live.conf

# If $live_keyboard_layouts exist, let live-config take care. Not here.
# 2012/06/29 gl_kbd and keyb (for live-config) should be deprecated. We should use $live_keyboard_layouts in the future.
if [ -z "$gl_kbd" -a -z "$keyb" -a -z "$live_keyboard_layouts" ]; then
  if [ -z "$TERM" -o "$TERM" = "dumb" ]; then
    # Set the terminal so that dialog/whiptal could work.
    export TERM=linux
  fi
  dpkg-reconfigure console-data
elif [ -n "$keyb" ]; then
  install-keymap ${keyb}
elif [ -n "$gl_kbd" ]; then
  # gl_kbd is for backward compatibility. In the future, we should use keyb from live-initramfs.
  install-keymap ${gl_kbd}
fi
