projects
/
grml-scripts.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Drop deprecate package grml-scanpartitions from Suggests.
[grml-scripts.git]
/
usr_bin
/
caps-ctrl
diff --git
a/usr_bin/caps-ctrl
b/usr_bin/caps-ctrl
index
b0d8f64
..
dfaec76
100755
(executable)
--- a/
usr_bin/caps-ctrl
+++ b/
usr_bin/caps-ctrl
@@
-12,12
+12,11
@@
fi
. /etc/grml/lsb-functions || ( alias einfo=echo ; alias eerror=echo; alias eend=echo )
emulate zsh
. /etc/grml/lsb-functions || ( alias einfo=echo ; alias eerror=echo; alias eend=echo )
emulate zsh
-autoload -U colors ; colors
if [[ -z $DISPLAY ]] ; then # test if X is not running when calling us
if [[ -z $DISPLAY ]] ; then # test if X is not running when calling us
- if [
[ $UID != 0 ]
] ; then # test if user root did invoke this command
+ if [
$(id -u) != 0
] ; then # test if user root did invoke this command
eerror "As of Linux 2.6.15 you need root permissions for changing"
eerror "As of Linux 2.6.15 you need root permissions for changing"
- eerror "the keyboard on console using loadkeys for security reasons."
+
eerror "the keyboard on console using loadkeys for security reasons."
eerror "Run this program with root permissions. Exiting." ; eend 1
exit 1
fi
eerror "Run this program with root permissions. Exiting." ; eend 1
exit 1
fi
@@
-25,8
+24,8
@@
if [[ -z $DISPLAY ]] ; then # test if X is not running when calling us
( einfo "caps-ctrl - switching caps lock and control key."
loadkeys <<- EOT
( einfo "caps-ctrl - switching caps lock and control key."
loadkeys <<- EOT
- keycode 58 =
`repeat 15 echo -n 'Control '`
- keycode 29 =
`repeat 7 echo -n 'Caps_Lock '`
+ keycode 58 =
$(repeat 15 echo -n 'Control ')
+ keycode 29 =
$(repeat 7 echo -n 'Caps_Lock ')
EOT
eend $?
EOT
eend $?
@@
-34,8
+33,8
@@
if [[ -z $DISPLAY ]] ; then # test if X is not running when calling us
einfo "caps-ctrl - switching caps lock and control key."
loadkeys <<- EOT
einfo "caps-ctrl - switching caps lock and control key."
loadkeys <<- EOT
- keycode 58 =
`repeat 15 echo -n 'Caps_Lock '`
- keycode 29 =
`repeat 7 echo -n 'Control '`
+ keycode 58 =
$(repeat 15 echo -n 'Caps_Lock ')
+ keycode 29 =
$(repeat 7 echo -n 'Control ')
EOT
eend $?
)
EOT
eend $?
)