diff options
| -rwxr-xr-x | got | 2 | ||||
| -rw-r--r-- | gotrc-examples/commands | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -67,7 +67,7 @@ _login () if [ ! "${user%@*}" = "${user}" ]; then setsid -c @ssh@ ${user} || sleep 3 # The sleep allows you to see any error you made - elif [ "${user%%-*}" = "" ]; then + elif [ ! "${user}" = "" ] && [ "${user%%-*}" = "" ]; then stty -icanon -echo -isig -ix{on,off,any} echo -e '\e[01;31mNice try! Sleeping for 10 minutes...\e[00m' sleep 600 diff --git a/gotrc-examples/commands b/gotrc-examples/commands index e0558f4..329ef0f 100644 --- a/gotrc-examples/commands +++ b/gotrc-examples/commands @@ -8,7 +8,7 @@ login_function=_login_commands _login_commands () { - if [ "${user%%+*}" = "" ]; then + if [ ! "${user}" = "" ] && [ "${user%%+*}" = "" ]; then if [ "${user}" = "+shutdown" ]; then shutdown -h now elif [ "${user}" = "+reboot" ]; then |
