jochemin / raspnode

Bitcoin full node + LND 0.4 Beta installation script

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Install fails on brand new Raspberry Pi due to logname failing

merehap opened this issue · comments

Running "sudo ./raspnode.sh" fails on my system with the error message "logname: no login name", the same message that the logname command fails with. I worked around this with replacing logname in the script with $USER. Perhaps the script should use something other than logname, or have a fallback?

This is with Raspian running on a Raspberry Pi 3, Model B from CanaKit.

If I change logname with $USER it returns me root as the script is launched with sudo.

logname works fine in my Raspberry with raspbian, it would be interesting to know if this problem is general or only occurs to you.

image

Yeah, you're right it was returning root (that did allow things to proceed, but not really in the right way).

I think the problem is general to anyone using the same version of Raspberry Pi from the same company. That said, it is clearly a bug with the specific Raspberry Pi distro rather than your script, so maybe you'd still want to just close this issue if there is no clear workaround.

Ok, so your distro was not raspbian?

No, it is Raspbian. I'm just not sure why logname would be failing on a vanilla, unmodified install. When I said "distro" I just meant any modifications that CanaKit or others would have made to base Raspian that would cause logname to fail.

In CanaKit web says they send an 8Gb microsd with NOOBS:
image

NOOBS just lets you choose which OSes you want to install. I only selected Raspbian from their menu.

Ok, I would like to know if this problem is with Raspbian installed from NOOBS and occurs always.

If someone has run the script in a Raspbian installed from NOOBS please, comment.

I had the same issue on Raspbian downloaded on official site https://www.raspberrypi.org/downloads/raspbian/ . I almost sure that it's the same image installed from NOOBS. I used a workaround and installed all like a charm ;) Thanks for your script, very useful!

I just created a bug on Raspbian's bug tracker for this: https://bugs.launchpad.net/raspbian/+bug/1758480

I had the same issue on my Raspberry 3b. Within the script, I replaced $(logname) with $LOGNAME and that works.