From 5593186c998c3f63c7abadd3eaa97e55004fc182 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 22 Feb 2026 13:50:59 +0100 Subject: m fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- gotrc-examples/commands | 82 ++++++++++++++++++++++++------------------------- 1 file changed, 40 insertions(+), 42 deletions(-) (limited to 'gotrc-examples/commands') diff --git a/gotrc-examples/commands b/gotrc-examples/commands index 0d57eca..6605884 100644 --- a/gotrc-examples/commands +++ b/gotrc-examples/commands @@ -2,7 +2,7 @@ # gates-of-tartaros – Minimal replacement for agetty with SSH support # -# Copyright © 2013, 2014, 2015 Mattias Andrée (maandree@member.fsf.org) +# Copyright © 2013, 2014, 2015 Mattias Andrée (m@maandree.se) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -24,42 +24,41 @@ login_function_commands=$login_function login_function=_login_commands -_login_commands () -{ - if [ ! "${user}" = "" ] && [ "${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 - elif [ "${user}" = "+keyboard" ]; then - echo "Enter keyboard layout: (e.g. sv-latin1)" - read -r layout - if [ ! "$(echo ${layout})" = "" ]; then - loadkeys -C "/dev/${tty}" -- ${layout} - if [ ! $? = 0 ]; then - echo 'Press ENTER to continue...' - read - fi - fi - elif [ "${user}" = "+1" ]; then - echo "Enter parameters: (e.g. tty7 TERM=linux)" - read -r params - setsid -- "$0" $params & - else - cat <