From 9621b0c61845394b4d67c21a017eb8e046d09743 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 30 Sep 2013 08:54:23 +0200 Subject: add commands gotrc example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- gotrc-examples/commands | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 gotrc-examples/commands (limited to 'gotrc-examples/commands') diff --git a/gotrc-examples/commands b/gotrc-examples/commands new file mode 100644 index 0000000..f4c6677 --- /dev/null +++ b/gotrc-examples/commands @@ -0,0 +1,36 @@ +# -*- 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::1}" = "+" ]; then + if [ "${user}" = "+shutdown" ]; then + shutdown + elif [ "${user}" = "+reboot" ]; then + reboot + elif [ "${user}" = "+backlight" ]; then + if [ "${LANG/UTF-8/}" = "${LANG}" ]; then + export LANG="en_GB.UTF-8" + fi + adjbacklight + else + echo <