#!/bin/bash
# Author: Steven Shiau <steven _at_ nchc org tw>
# License: GPL

# Load DRBL setting and functions
DRBL_SCRIPT_PATH="${DRBL_SCRIPT_PATH:-/usr/share/drbl}"

. $DRBL_SCRIPT_PATH/sbin/drbl-conf-functions
. /etc/drbl/drbl-ocs.conf
. $DRBL_SCRIPT_PATH/sbin/ocs-functions

# Load keymap if it exists
[ -e /etc/ocs/ocs-live.conf ] && . /etc/ocs/ocs-live.conf

# If plymouth is running, we should not run the locales and keyboard config. Will run that after entering runlevel 2
if [ -n "$(LC_ALL=C ps -efw | grep plymouth | grep -v grep)" ]; then
  # Make a tag so that later in runlevel 2 ocs-lang-kbd-conf could be run.
  touch /run/lock/start-ocs-lang-kbd-conf
  exit 2
else
  ocs-lang-kbd-conf
fi

