update for login script /usr/local/bin/nems-info

Found something amiss in NEMS? Confirm first that you are running the latest version, and then post your bug report here.
Post Reply
borgelite
Junior Member
Posts: 3
Joined: Wed Sep 05, 2018 2:14 pm

update for login script /usr/local/bin/nems-info

Post by borgelite »

Please update the login script im german and i use UTF8.
I become an error by login:

Code: Select all

Linux nems 4.14.68-v7+ #1140 SMP Wed Sep 5 17:17:58 BST 2018 armv7l

Last login: Fri Sep  7 09:02:04 2018 from 10.0.1.86
0,00
/usr/local/bin/nems-info: Zeile 109: printf: 0.10836298932384: Ungültige Zahl.
    while executing
"exec -- /usr/local/bin/nems-info loadaverageround"
    invoked from within
"set sysload(10080) [exec -- /usr/local/bin/nems-info loadaverageround]"
    (file "/etc/motd.tcl" line 68)
sysuser@nems:~ $ sudo su

I change the login first line:

Code: Select all

#!/bin/bash
# NEMS Server Info Script (primarily used for MOTD)
export LC_NUMERIC=C
export COMMAND=$1
export VARIABLE=$2
and the last line:

Code: Select all

# Output usage info as no valid command line argument was provided
else
  echo "Usage: ./$me command"
  echo "For help, visit docs.nemslinux.com/commands/nems-info"
fi

unset LC_NUMERIC
now it works .
User avatar
Robbie Ferguson
Posting Freak
Posts: 835
Joined: Wed Mar 07, 2012 3:23 pm
Location: Ontario, Canada
Contact:

RE: update for login script /usr/local/bin/nems-info

Post by Robbie Ferguson »

Thanks for letting me know.

Do you know how to do a Pull Request? Looks like you've already written a patch, so that'd be nice if you submitted it as a PR.

Also, please note that because you edited that script, you have broken your nems-update.

You'll need to reinstall nems-scripts, or reflash your card, because now you will be unable to receive updates from the server (as your git commit is out of sync since you manually edited init.sh).

Let me know. I can help you fix it, and also apply a patch if you're not sure how to do a Pull Request.
Robbie Ferguson // The Bald Nerd

Did I help you out? Appreciate what I do? Please consider saying thanks:
User avatar
Robbie Ferguson
Posting Freak
Posts: 835
Joined: Wed Mar 07, 2012 3:23 pm
Location: Ontario, Canada
Contact:

RE: update for login script /usr/local/bin/nems-info

Post by Robbie Ferguson »

Hi again, borgelite.
Don't worry about the PR at this point - I've pushed out the fix.
The issue now though is that you have edited your NEMS source, so you are now out of sync.

Please run the following command as root (sudo su):

cd /usr/local/share/nems && rm -rf nems-scripts && git clone https://github.com/Cat5TV/nems-scripts

That will delete your edited copy and reinstall nems-scripts (which contains nems-info).

You'll see the current copy contains your patch, so it should work now. Please let me know if you have any other trouble, and thanks again for pointing this out!
Robbie Ferguson // The Bald Nerd

Did I help you out? Appreciate what I do? Please consider saying thanks:
Post Reply