summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorV3n3RiX <venerix@rogentos.ro>2016-03-19 11:08:55 +0000
committerV3n3RiX <venerix@rogentos.ro>2016-03-19 11:08:55 +0000
commit266ae56ee4e1fa97a2a470047118336f4f557219 (patch)
tree6a7b11251d79c5a7d325c1420da742fa5f627f4c
parentcf932311c50d360cd5e2cc89b23028925408d502 (diff)
simple parsing
-rwxr-xr-xkogaionlive.sh14
1 files 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