From 266ae56ee4e1fa97a2a470047118336f4f557219 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 19 Mar 2016 11:08:55 +0000 Subject: simple parsing --- kogaionlive.sh | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/kogaionlive.sh b/kogaionlive.sh index 3bfcda6..5b6fb70 100755 --- a/kogaionlive.sh +++ b/kogaionlive.sh @@ -1,7 +1,6 @@ #!/usr/bin/env bash export local liveuser="kogaion" -export local CMDLINE=$(cat /proc/cmdline 2> /dev/null) checkroot () { if [[ "$(whoami)" != root ]] ; then @@ -27,17 +26,8 @@ kogaion_live_user_password () { } kogaion_locale_switch () { - for boot_param in "$CMDLINE"; do - case "$boot_param" in - rd.locale.LANG=*) - export local lang_toset=""$boot_param"/*=" - ;; - vconsole.keymap=*) - export local keymap_toset=""$boot_param"/*=" - ;; - esac - done - + export local keymap_toset="$(cat /proc/cmdline | cut -d " " -f12 | cut -d "=" -f2)" + export local lang_toset="$(cat /proc/cmdline | cut -d " " -f13 | cut -d "=" -f2)" if [[ "$lang_toset" != "en_US.utf8" ]] || [[ "$keymap_toset" != "us" ]] ; then /usr/bin/localectl set-locale LANG="$lang_toset" > /dev/null 2>&1 /usr/bin/localectl set-keymap "$keymap_toset" > /dev/null 2>&1 -- cgit v1.2.3