X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=usr_sbin%2Fgrml-setkeyboard;h=f5873e67257ae3a8d1467f718e04c7d017935aa8;hb=e0a12bd3e2415e73e0a49c7df264cef1786daca1;hp=f644e4166e61baaf22d1eb04ca566aaf5f6fd49f;hpb=e720deae78f1eda5e6f62629606c194f16796762;p=grml-scripts.git diff --git a/usr_sbin/grml-setkeyboard b/usr_sbin/grml-setkeyboard index f644e41..f5873e6 100755 --- a/usr_sbin/grml-setkeyboard +++ b/usr_sbin/grml-setkeyboard @@ -4,17 +4,16 @@ # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2. -# Latest change: Sam Aug 05 11:40:27 CEST 2006 [mika] +# Latest change: Mit Sep 05 19:06:41 CEST 2007 [mika] ################################################################################ PN="$(basename $0)" DIALOG=dialog CMDLINE=/proc/cmdline -if [ $UID != 0 ] ; then - echo Error: become root before starting $PN >& 2 - exit 100 -fi +. /etc/grml/script-functions + +check4root || exit 1 setvalue(){ [ -n "$2" ] || return 1 @@ -26,12 +25,6 @@ setvalue(){ fi } -# grml-small does not provide any further locales -# if grep -q small /etc/grml_version ; then -# $DIALOG --stdout --msgbox "Notice: grml-small -# does not provide a full language setup." 0 0 -# fi - # same for strings stringinstring(){ case "$2" in *$1*) return 0;; esac @@ -57,7 +50,7 @@ if [ -z "$DEFAULT_KEYBOARD" ] ; then fi fi -LANGUAGE=$($DIALOG --stdout --title "$PN" --default-item $DEFAULT_KEYBOARD --radiolist \ +LANGUAGE=$(LANG=C $DIALOG --stdout --title "$PN" --default-item $DEFAULT_KEYBOARD --radiolist \ "Which keyboard layout do you want to use? Please notice that this will not really affect your currently running system. @@ -65,7 +58,6 @@ If you want to change keyboard settings temporarly please use grml-lang instead. Configuration will be written to /etc/sysconfig/keyboard" 0 0 0 \ at austrian off \ - de german off \ be belgian off \ bg bulgarian off \ cf "french canadian" off \ @@ -73,15 +65,16 @@ Configuration will be written to /etc/sysconfig/keyboard" 0 0 0 \ cn chinese off \ cs czech off \ cz czech off \ - dk dansk off \ da da off \ + de german off \ + dk dansk off \ en "english [us] (default)" on \ es spanish off \ fi finnish off \ fr french off \ he hebrew off \ - il hebrew off \ ie irish off \ + il hebrew off \ it italian off \ ja japanese off \ nl dutch off \ @@ -118,10 +111,10 @@ retval=$? case $retval in (0) # everything ok - $DIALOG --stdout --msgbox "Writing keyboard settings ($KEYTABLE) to /etc/sysconfig/keyboard was successful." 0 0 + LANG=C $DIALOG --stdout --msgbox "Writing keyboard settings ($KEYTABLE) to /etc/sysconfig/keyboard was successful." 0 0 ;; *) - $DIALOG --stdout --msgbox "Error writing settings for $KEYTABLE to /etc/sysconfig/keyboard." 0 0 + LANG=C $DIALOG --stdout --msgbox "Error writing settings for $KEYTABLE to /etc/sysconfig/keyboard." 0 0 ;; esac