projects
/
grml-scripts-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
updated changelog
[grml-scripts-core.git]
/
usr_sbin
/
grml-setkeyboard
diff --git
a/usr_sbin/grml-setkeyboard
b/usr_sbin/grml-setkeyboard
index
04464de
..
25660e4
100755
(executable)
--- a/
usr_sbin/grml-setkeyboard
+++ b/
usr_sbin/grml-setkeyboard
@@
-4,17
+4,15
@@
# Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
# Bug-Reports: see http://grml.org/bugs/
# License: This file is licensed under the GPL v2.
# Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
# 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]
################################################################################
PN="$(basename $0)"
DIALOG=dialog
CMDLINE=/proc/cmdline
################################################################################
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
setvalue(){
[ -n "$2" ] || return 1
@@
-26,12
+24,6
@@
setvalue(){
fi
}
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
# same for strings
stringinstring(){
case "$2" in *$1*) return 0;; esac
@@
-57,7
+49,7
@@
if [ -z "$DEFAULT_KEYBOARD" ] ; then
fi
fi
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.
"Which keyboard layout do you want to use?
Please notice that this will not really affect your currently running system.
@@
-65,7
+57,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 \
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 \
be belgian off \
bg bulgarian off \
cf "french canadian" off \
@@
-73,15
+64,16
@@
Configuration will be written to /etc/sysconfig/keyboard" 0 0 0 \
cn chinese off \
cs czech off \
cz czech off \
cn chinese off \
cs czech off \
cz czech off \
- dk dansk off \
da da 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 \
en "english [us] (default)" on \
es spanish off \
fi finnish off \
fr french off \
he hebrew off \
- il hebrew off \
ie irish off \
ie irish off \
+ il hebrew off \
it italian off \
ja japanese off \
nl dutch off \
it italian off \
ja japanese off \
nl dutch off \
@@
-104,7
+96,7
@@
case $retval in
esac
# read in the file where all the $LANGUAGE stuff is defined
esac
# read in the file where all the $LANGUAGE stuff is defined
-
source
/etc/grml/language-functions
+
.
/etc/grml/language-functions
cat > /etc/sysconfig/keyboard <<EOF
# File generated by $PN on $(date)
cat > /etc/sysconfig/keyboard <<EOF
# File generated by $PN on $(date)