blob: 6c382bf39be2ba629b23ff1b4b490d82f44277fc (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
# -*- shell-script -*-
# The module allows you to launch a few programs without even logging in
login_function_commands=$login_function
login_function=_login_commands
function _login_commands
{
if [ "${user%%+*}" = "" ]; then
if [ "${user}" = "+shutdown" ]; then
shutdown -h now
elif [ "${user}" = "+reboot" ]; then
reboot
elif [ "${user}" = "+time" ]; then
echo
date +%Y-\(%m\)%b-%d\ %T,\ %a\ w%W/%V,\ %Z
read
elif [ "${user}" = "+battery" ]; then
echo
acpi -V
read
elif [ "${user}" = "+backlight" ]; then
if [ "${LANG/UTF-8/}" = "${LANG}" ]; then
export LANG="en_GB.UTF-8"
fi
adjbacklight
else
cat <<EOF
Command is not recognised.
Recognised commands include:
+shutdown Shutdown the computer
+reboot Reboot the computer
+backlight Adjust the backlight
EOF
read
fi
else
$login_function_commands
fi
}
|